Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>OpenCL host APIs allow you to specify the the the number of devices when you get the device ids list</p> <pre><code>_int clGetDeviceIDs( cl_platform_id platform, cl_device_type device_type, cl_uint num_entries, // Controls the minimum number of devices cl_device_id *devices, cl_uint *num_devices) </code></pre> <p>The device id pointer *devices can be used to create the context with a specific number of devices.</p> <p>Here is what the spec says</p> <blockquote> <p>num_entries is the number of cl_device entries that can be added to devices. If devices is not NULL, the num_entries must be greater than zero. devices returns a list of OpenCL devices found. The cl_device_id values returned in devices can be used to identify a specific OpenCL device. If devices argument is NULL, this argument is ignored. The number of OpenCL devices returned is the minimum of the value specified by num_entries or the number of OpenCL devices whose type matches device_type. num_devices returns the number of OpenCL devices available that match device_type. If num_devices is NULL, this argument is ignored</p> </blockquote> <pre><code>cl_context clCreateContext( const cl_context_properties *properties, cl_uint num_devices, // Number of devices const cl_device_id *devices, (voidCL_CALLBACK *pfn_notify) ( const char *errinfo, const void *private_info, size_t cb, void *user_data ), void *user_data, cl_int *errcode_ret) </code></pre> <p>Each device is then addressed through its own device queue.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload