Exemple #1
0
        public static BurstFunc <TResult> Compile(Func <TResult> func)
        {
            var functionPointer = BurstCompiler.CompileFunctionPointer(func);

            DelegateCache <Func <TResult> > .SetDelegate(functionPointer.Value, func);

            return(new BurstFunc <TResult>(functionPointer));
        }
Exemple #2
0
        public static BurstAction Compile(Action action)
        {
            var functionPointer = BurstCompiler.CompileFunctionPointer(action);

            DelegateCache <Action> .SetDelegate(functionPointer.Value, action);

            return(new BurstAction(functionPointer));
        }
Exemple #3
0
 private void CheckBurst()
 {
     burstEnabled = false;
     value        = DelegateCache <Func <TResult> > .GetDelegate(functionPointer.Value).Invoke();
 }
Exemple #4
0
 private void CheckBurst()
 {
     burstEnabled = false;
     DelegateCache <Action> .GetDelegate(functionPointer.Value).Invoke();
 }