public void FillNativeArray() { SafeArray <T> nativeArray = GetValue <SafeArray <T> >("nativeArray"); T fill = GetValue <T>("fill"); nativeArray.Fill(fill); }
public void ArithmeticMultiplyNativeArray() { T mul = GetValue <T>("mul"); T fill = GetValue <T>("fill"); SafeArray <T> array = GetValue <SafeArray <T> >("nativeArray"); array.Fill(fill); array.VectorMultiply(mul); }
public void FillNativeArrayWithCreate() { SafeArray <T> nativeArray = new SafeArray <T>(ArraySize); T fill = GetValue <T>("fill"); nativeArray.Fill(fill); nativeArray.Release(); nativeArray.Close(); nativeArray = null; }
public void ArithmeticMutiplyGlobalSetup() { InfoThis(); (T mul, T fill) = GM <T> .RandomMultiplyFactorAndValue(); SafeArray <T> na = new SafeArray <T>(ArraySize); T[] ma = new T[ArraySize]; Info($"Array fill value is {fill}."); Info($"Array mul value is {mul}."); na.Fill(fill); for (int i = 0; i < ma.Length; i++) { ma[i] = fill; } na.Acquire(); SetValue("fill", fill); SetValue("mul", mul); SetValue("managedArray", ma); SetValue("nativeArray", na); }