This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal static class Burst2ManagedCall<T, Key> | |
{ | |
private static T s_Delegate; | |
// alignment 16 is important to not crash on arm cpu | |
private static readonly SharedStatic<FunctionPointer<T>> s_SharedStatic = SharedStatic<FunctionPointer<T>>.GetOrCreate<FunctionPointer<T>, Key>(16); | |
public static bool IsCreated => s_SharedStatic.Data.IsCreated; | |
public static void Init(T @delegate) | |
{ | |
CheckIsNotCreated(); |