예제 #1
0
        public void float2_normalize_burst()
        {
            FunctionPointer <float2_normalize.TestFunction> testFunction = BurstCompiler.CompileFunctionPointer <float2_normalize.TestFunction>(float2_normalize.BurstTestFunction);
            var args = new float2_normalize.Arguments();

            args.Init();

            Measure.Method(() =>
            {
                testFunction.Invoke(ref args);
            })
            .Definition(sampleUnit: SampleUnit.Microsecond)
            .WarmupCount(1)
            .MeasurementCount(10)
            .Run();
            args.Dispose();
        }
예제 #2
0
        public void float2_normalize_mono()
        {
            float2_normalize.TestFunction testFunction = float2_normalize.MonoTestFunction;
            var args = new float2_normalize.Arguments();

            args.Init();

            Measure.Method(() =>
            {
                testFunction.Invoke(ref args);
            })
            .Definition(sampleUnit: SampleUnit.Microsecond)
            .WarmupCount(1)
            .MeasurementCount(10)
            .Run();
            args.Dispose();
        }