Esempio n. 1
0
        public void float2_hash_burst()
        {
            FunctionPointer <float2_hash.TestFunction> testFunction = BurstCompiler.CompileFunctionPointer <float2_hash.TestFunction>(float2_hash.BurstTestFunction);
            var args = new float2_hash.Arguments();

            args.Init();

            Measure.Method(() =>
            {
                testFunction.Invoke(ref args);
            })
            .Definition(sampleUnit: SampleUnit.Microsecond)
            .WarmupCount(1)
            .MeasurementCount(10)
            .Run();
            args.Dispose();
        }
Esempio n. 2
0
        public void float2_hash_mono()
        {
            float2_hash.TestFunction testFunction = float2_hash.MonoTestFunction;
            var args = new float2_hash.Arguments();

            args.Init();

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