@ -22,7 +22,7 @@
[Params(16, 128, 1024)]
public int Count { get; set; }
[Setup]
[GlobalSetup]
public void Setup()
{
this.destination = new Buffer<Rgba32>(this.Count);
@ -31,7 +31,7 @@
this.destination.Pin();
}
[Cleanup]
[GlobalCleanup]
public void Cleanup()
this.source.Dispose();
@ -16,14 +16,14 @@ namespace ImageSharp.Benchmarks.Color.Bulk
this.destination = new Buffer<TPixel>(this.Count);
this.source = new Buffer<byte>(this.Count * 4);
this.destination.Dispose();
@ -18,14 +18,14 @@ namespace ImageSharp.Benchmarks.Color.Bulk
[Params(64, 300, 1024)]
this.source = new Buffer<TPixel>(this.Count);
this.destination = new Buffer<Vector4>(this.Count);
this.destination = new Buffer<byte>(this.Count * 3);
@ -21,14 +21,14 @@ namespace ImageSharp.Benchmarks.Color.Bulk
this.destination = new Buffer<byte>(this.Count * 4);
@ -116,7 +116,7 @@
private int[] inputSourceRGBAsInteger = null;
// Console.WriteLine("Vector<int>.Count: " + Vector<int>.Count);
@ -27,7 +27,7 @@ namespace ImageSharp.Benchmarks.General
public int Min { get; private set; }
public int Max { get; private set; }
public void SetUp()
this.flatArray = new float[this.Count * this.Count];
@ -20,7 +20,7 @@ namespace ImageSharp.Benchmarks.General
byte[] destination;
this.source = new byte[this.Count];
@ -18,7 +18,7 @@ namespace ImageSharp.Benchmarks.General
@ -15,13 +15,13 @@ namespace ImageSharp.Benchmarks.General
[Params(32, 128, 512)]
this.buffer = new Buffer<Rgba32>(this.Count);
this.buffer.Dispose();
[Params(64, 1024)]
public int Length { get; set; }
this.buffer = new Buffer<Vector4>(this.Length);
@ -145,7 +145,7 @@
// [Params(1024)]
public int Count { get; set; } = 1024;
this.width = 2048;
@ -158,7 +158,7 @@
this.endIndex = 2048 / 2 + (this.Count / 2);
private Block8x8F inputDividend = default(Block8x8F);
private Block8x8F inputDivisior = default(Block8x8F);
for (int i = 0; i < Block8x8F.ScalarCount; i++)
private Vector4 parameter;
this.random = new Random(42);
@ -15,7 +15,7 @@ namespace ImageSharp.Benchmarks.General.Vectorization
private uint testValue;
this.input = new uint[this.InputSize];
private float testValue;
this.input = new float[this.InputSize];
@ -25,7 +25,7 @@ namespace ImageSharp.Benchmarks.General.Vectorization
@ -20,7 +20,7 @@ namespace ImageSharp.Benchmarks.General.Vectorization
[Params(64)]
public int InputSize { get; set; }
this.data = new float[this.InputSize];
@ -18,7 +18,7 @@ namespace ImageSharp.Benchmarks.Image
private byte[] bmpBytes;
public void ReadImages()
if (this.bmpBytes == null)
@ -20,7 +20,7 @@ namespace ImageSharp.Benchmarks.Image
private MemoryStream filter3;
private MemoryStream filter4;
this.filter0 = new MemoryStream(File.ReadAllBytes("../ImageSharp.Tests/TestImages/Formats/Png/filter0.png"));
private byte[] gifBytes;
if (this.gifBytes == null)
private byte[] jpegBytes;
if (this.jpegBytes == null)
private byte[] pngBytes;
if (this.pngBytes == null)
private Image bmpDrawing;
private Image<Rgba32> bmpCore;
if (this.bmpStream == null)
@ -32,7 +32,7 @@ namespace ImageSharp.Benchmarks.Image
this.bmpStream.Dispose();
@ -27,7 +27,7 @@ namespace ImageSharp.Benchmarks.Image
[Params(false)]
public bool LargeImage { get; set; }
@ -41,7 +41,7 @@ namespace ImageSharp.Benchmarks.Image
@ -29,7 +29,7 @@ namespace ImageSharp.Benchmarks.Image
public bool UseOctreeQuantizer { get; set; }
@ -44,7 +44,7 @@ namespace ImageSharp.Benchmarks.Image
@ -83,7 +83,7 @@ namespace ImageSharp.Benchmarks.Image
protected abstract IEnumerable<string> InputImageSubfoldersOrFiles { get; }
if (!Vector.IsHardwareAccelerated)
@ -17,7 +17,7 @@ namespace ImageSharp.Benchmarks
private Image<Rgba32> image;
public void ReadImage()
if (this.image == null)
@ -29,7 +29,7 @@ namespace ImageSharp.Benchmarks
this.image.Dispose();
@ -22,7 +22,7 @@ namespace ImageSharp.Benchmarks
private GlowProcessor<Rgba32> bulk;
private GlowProcessorParallel<Rgba32> parallel;
this.bulk = new GlowProcessor<Rgba32>(NamedColors<Rgba32>.Beige, GraphicsOptions.Default) { Radius = 800 * .5f, };