// Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. using System.Buffers; using System.Numerics; using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.PixelFormats; using Xunit; namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations { [Trait("Category", "PixelFormats")] public partial class PixelOperationsTests { public partial class Rgba32_OperationsTests : PixelOperationsTests { [Fact(Skip = SkipProfilingBenchmarks)] public void Benchmark_ToVector4() { const int times = 200000; const int count = 1024; using (IMemoryOwner source = Configuration.Default.MemoryAllocator.Allocate(count)) using (IMemoryOwner dest = Configuration.Default.MemoryAllocator.Allocate(count)) { this.Measure( times, () => PixelOperations.Instance.ToVector4( this.Configuration, source.GetSpan(), dest.GetSpan())); } } } } }