Contains bindings to the OpenCL 1.0 functions.
See the OpenCL specification for documentation regarding these functions.
Esempio n. 1
0
 public new static ComputeErrorCode SetCommandQueueProperty(
     CLCommandQueueHandle command_queue,
     ComputeCommandQueueFlags properties,
     [MarshalAs(UnmanagedType.Bool)] bool enable,
     out ComputeCommandQueueFlags old_properties)
 {
     RILogManager.Default?.SendTrace("WARNING! clSetCommandQueueProperty has been deprecated in OpenCL 1.1.");
     return(CL10.SetCommandQueueProperty(command_queue, properties, enable, out old_properties));
 }
Esempio n. 2
0
 new public static ComputeErrorCode SetCommandQueueProperty(
     CLCommandQueueHandle command_queue,
     ComputeCommandQueueFlags properties,
     [MarshalAs(UnmanagedType.Bool)] bool enable,
     out ComputeCommandQueueFlags old_properties)
 {
     //Console.WriteLine("WARNING! clSetCommandQueueProperty has been deprecated in OpenCL 1.1.");
     return(CL10.SetCommandQueueProperty(command_queue, properties, enable, out old_properties));
 }
Esempio n. 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="platform"></param>
        public CLx(ComputePlatform platform)
        {
            if (platform.Extensions.Contains("cl_ext_device_fission"))
            {
                clCreateSubDevicesEXT = (Delegates.clCreateSubDevicesEXT)Marshal.GetDelegateForFunctionPointer(CL10.GetExtensionFunctionAddress("clCreateSubDevicesEXT"), typeof(Delegates.clCreateSubDevicesEXT));
                clReleaseDeviceEXT    = (Delegates.clReleaseDeviceEXT)Marshal.GetDelegateForFunctionPointer(CL10.GetExtensionFunctionAddress("clReleaseDeviceEXT"), typeof(Delegates.clReleaseDeviceEXT));
                clRetainDeviceEXT     = (Delegates.clRetainDeviceEXT)Marshal.GetDelegateForFunctionPointer(CL10.GetExtensionFunctionAddress("clRetainDeviceEXT"), typeof(Delegates.clRetainDeviceEXT));
            }

            if (platform.Extensions.Contains("cl_ext_migrate_memobject"))
            {
                clEnqueueMigrateMemObjectEXT = (Delegates.clEnqueueMigrateMemObjectEXT)Marshal.GetDelegateForFunctionPointer(CL10.GetExtensionFunctionAddress("clEnqueueMigrateMemObjectEXT"), typeof(Delegates.clEnqueueMigrateMemObjectEXT));
            }

            if (platform.Extensions.Contains("cl_khr_gl_sharing"))
            {
                clGetGLContextInfoKHR = (Delegates.clGetGLContextInfoKHR)Marshal.GetDelegateForFunctionPointer(CL10.GetExtensionFunctionAddress("clGetGLContextInfoKHR"), typeof(Delegates.clGetGLContextInfoKHR));
            }

            //if (platform.Extensions.Contains("cl_khr_icd"))
            //    clIcdGetPlatformIDsKHR = (Delegates.clIcdGetPlatformIDsKHR)Marshal.GetDelegateForFunctionPointer(CL10.GetExtensionFunctionAddress("clIcdGetPlatformIDsKHR"), typeof(Delegates.clIcdGetPlatformIDsKHR));
        }