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)); }
public static BurstAction Compile(Action action) { var functionPointer = BurstCompiler.CompileFunctionPointer(action); DelegateCache <Action> .SetDelegate(functionPointer.Value, action); return(new BurstAction(functionPointer)); }
private void CheckBurst() { burstEnabled = false; value = DelegateCache <Func <TResult> > .GetDelegate(functionPointer.Value).Invoke(); }
private void CheckBurst() { burstEnabled = false; DelegateCache <Action> .GetDelegate(functionPointer.Value).Invoke(); }