예제 #1
0
        public void FillNativeArray()
        {
            SafeArray <T> nativeArray = GetValue <SafeArray <T> >("nativeArray");
            T             fill        = GetValue <T>("fill");

            nativeArray.Fill(fill);
        }
예제 #2
0
        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);
        }
예제 #3
0
        public void FillNativeArrayWithCreate()
        {
            SafeArray <T> nativeArray = new SafeArray <T>(ArraySize);
            T             fill        = GetValue <T>("fill");

            nativeArray.Fill(fill);
            nativeArray.Release();
            nativeArray.Close();
            nativeArray = null;
        }
예제 #4
0
        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);
        }