public Context() { var contextSettings = new ContextSettings { }; contextSettings.version = Constants.kVersion; contextSettings.logCallback = LogMessage; contextSettings.simdLevel = SIMDLevel.AVX2; var status = API.iplContextCreate(ref contextSettings, out mContext); if (status != Error.Success) { throw new Exception(string.Format("Unable to create context. [{0}]", status)); } }
public static extern Error iplContextCreate(ref ContextSettings settings, out IntPtr context);