Пример #1
0
        public void snoise2D_burst()
        {
            FunctionPointer <snoise2D.TestFunction> testFunction = BurstCompiler.CompileFunctionPointer <snoise2D.TestFunction>(snoise2D.BurstTestFunction);
            var args = new snoise2D.Arguments();

            args.Init();

            Measure.Method(() =>
            {
                testFunction.Invoke(ref args);
            })
            .Definition(sampleUnit: SampleUnit.Microsecond)
            .WarmupCount(1)
            .MeasurementCount(10)
            .Run();
            args.Dispose();
        }
Пример #2
0
        public void snoise2D_mono()
        {
            snoise2D.TestFunction testFunction = snoise2D.MonoTestFunction;
            var args = new snoise2D.Arguments();

            args.Init();

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