コード例 #1
0
        public void float4_shuffle_burst()
        {
            FunctionPointer<float4_shuffle.TestFunction> testFunction = BurstCompiler.CompileFunctionPointer<float4_shuffle.TestFunction>(float4_shuffle.BurstTestFunction);
            var args = new float4_shuffle.Arguments();
            args.Init();

            var burstSampleGroup = new SampleGroup("Burst", SampleUnit.Microsecond);            Measure.Method(() =>
            {
                testFunction.Invoke(ref args);
            })
            .SampleGroup(burstSampleGroup)
            .WarmupCount(1)
            .MeasurementCount(10)
            .Run();
            args.Dispose();
        }
コード例 #2
0
        public void float4_shuffle_mono()
        {
            float4_shuffle.TestFunction testFunction = float4_shuffle.MonoTestFunction;
            var args = new float4_shuffle.Arguments();
            args.Init();

            var monoSampleGroup = new SampleGroup("Mono", SampleUnit.Microsecond);            Measure.Method(() =>
            {
                testFunction.Invoke(ref args);
            })
            .SampleGroup(monoSampleGroup)
            .WarmupCount(1)
            .MeasurementCount(10)
            .Run();
            args.Dispose();
        }