示例#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));
        }
示例#2
0
        public static BurstAction Compile(Action action)
        {
            var functionPointer = BurstCompiler.CompileFunctionPointer(action);

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

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