private static extern ContextSafeHandle clCreateContext( [In, MarshalAs(UnmanagedType.LPArray)] IntPtr[] properties, uint numDevices, [In, MarshalAs(UnmanagedType.LPArray)] ClDeviceID[] devices, CreateContextCallback pfnNotify, IntPtr userData, out ErrorCode errorCode);
public static ContextSafeHandle CreateContextFromType(DeviceType deviceType, CreateContextCallback pfnNotify, IntPtr userData) { ErrorCode errorCode = ErrorCode.Success; ContextSafeHandle result = clCreateContextFromType(null, deviceType, pfnNotify, userData, out errorCode); ErrorHandler.ThrowOnFailure(errorCode); return(result); }
public static ContextSafeHandle CreateContext(ClDeviceID[] devices, CreateContextCallback pfnNotify, IntPtr userData) { ErrorCode errorCode = ErrorCode.Success; ContextSafeHandle result = clCreateContext(null, (uint)devices.Length, devices, pfnNotify, userData, out errorCode); ErrorHandler.ThrowOnFailure(errorCode); return(result); }
public static ContextSafeHandle CreateContextFromType(ClPlatformID platform, DeviceType deviceType, CreateContextCallback pfnNotify, IntPtr userData) { IntPtr[] properties = { ContextProperties.Platform, platform.Handle, IntPtr.Zero }; ErrorCode errorCode = ErrorCode.Success; ContextSafeHandle result = clCreateContextFromType(properties, deviceType, pfnNotify, userData, out errorCode); ErrorHandler.ThrowOnFailure(errorCode); return(result); }
private static extern ContextSafeHandle clCreateContextFromType( [In, MarshalAs(UnmanagedType.LPArray)] IntPtr[] properties, DeviceType deviceType, CreateContextCallback pfnNotify, IntPtr userData, out ErrorCode errorCode);