-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Processing dotnet/runtime#123754 (comment) command:
Original command:
-x64 -arm
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
using System.Numerics.Tensors;
BenchmarkSwitcher.FromAssembly(typeof(Bench).Assembly).Run(args);
public class Bench
{
private Half[] _source = default!;
private Half[] _destination = default!;
[Params(1000)]
public int Count { get; set; }
[GlobalSetup]
public void Setup()
{
_source = Enumerable.Range(0, Count)
.Select(i => (Half)(i % 2 == 0 ? i * 0.1f : -i * 0.1f))
.ToArray();
_destination = new Half[Count];
}
[Benchmark]
public void BitIncrement()
{
TensorPrimitives.BitIncrement<Half>(_source, _destination);
}
[Benchmark]
public void BitDecrement()
{
TensorPrimitives.BitDecrement<Half>(_source, _destination);
}
}(EgorBot will reply in this issue)
Metadata
Metadata
Assignees
Labels
No labels