You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
General design for a benchmark run over an array/buffer should be:
Compute the baseline value using builtin .NET operators and methods from System.Math.
Compute the value using JEM methods.
In the cleanup phase after each benchmark iteration compare the JEM/builitin values for each element in the array and throw an exception if any don't match.
The text was updated successfully, but these errors were encountered:
Added in 88c3c2b. e.g for validating the array multiply benchmark:
int index = GM<T>.Rng.Next(0, ArraySize);
SafeArray<T> nativeArray = GetValue<SafeArray<T>>("nativeArray");
T[] managedArray = GetValue<T[]>("managedArray");
T mul = GetValue<T>("mul");
T fill = GetValue<T>("fill");
T val = GM<T>.Multiply(fill, mul);
if (!nativeArray[index].Equals(val))
{
Log.WriteLineError($"Native array at index {index} is {nativeArray[index]} not {val}.");
throw new Exception();
}
else if (!managedArray[index].Equals(val))
{
Log.WriteLineError($"Managed array at index {index} is {managedArray[index]} not {val}.");
throw new Exception();
}
General design for a benchmark run over an array/buffer should be:
The text was updated successfully, but these errors were encountered: