C Specification
To query a media adapter for any associated OpenCL devices, call the function
// Provided by cl_khr_dx9_media_sharing
cl_int clGetDeviceIDsFromDX9MediaAdapterKHR(
cl_platform_id platform,
cl_uint num_media_adapters,
cl_dx9_media_adapter_type_khr* media_adapter_type,
void* media_adapters,
cl_dx9_media_adapter_set_khr media_adapter_set,
cl_uint num_entries,
cl_device_id* devices,
cl_uint* num_devices);
clGetDeviceIDsFromDX9MediaAdapterKHR is provided by the cl_khr_dx9_media_sharing extension.
|
Parameters
-
platform refers to the platform ID returned by clGetPlatformIDs.
-
num_media_adapters specifies the number of media adapters.
-
media_adapters_type is an array of num_media_adapters entries. Each entry specifies the type of media adapter and must be one of the values described in the media adapter type table below.
-
media_adapters is an array of num_media_adapters entries. Each entry specifies the actual adapter whose type is specified by media_adapter_type. The media_adapters must be one of the types described in the cl_dx9_media_adapter_type_khr values table.
-
media_adapter_set specifies the set of adapters to return and must be one of the values described in the cl_dx9_media_adapter_set_khr values table.
-
num_entries is the number of
cl_device_entries that can be added to devices. If devices is notid NULL, the num_entries must be greater than zero. -
devices returns a list of OpenCL devices found that support the list of media adapters specified. The
cl_device_values returned in devices can be used to identify a specific OpenCL device. If devices argument isid 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. If num_devices is
NULL, this argument is ignored.
Description
cl_dx9_ |
Type of Media Adapter |
|---|---|
provided by the |
|
provided by the |
|
provided by the |
|
cl_dx9_ |
Description |
|---|---|
provided by the |
The preferred OpenCL devices associated with the media adapter. |
provided by the |
All OpenCL devices that may interoperate with the media adapter |
clGetDeviceIDsFromDX9MediaAdapterKHR returns CL_SUCCESS if the function
is executed successfully.
Otherwise, it returns one of the following errors:
-
CL_INVALID_if platform is not a valid platform.PLATFORM -
CL_INVALID_if num_media_adapters is zero or if media_adapters_type isVALUE NULLor if media_adapters isNULL. -
CL_INVALID_if any of the entries in media_adapters_type or media_adapters is not a valid value.VALUE -
CL_INVALID_if media_adapter_set is not a valid value.VALUE -
CL_INVALID_if num_entries is equal to zero and devices is notVALUE NULLor if both num_devices and devices areNULL. -
CL_DEVICE_if no OpenCL devices that correspond to adapters specified in media_adapters and media_adapters_type were found.NOT_ FOUND -
CL_OUT_if there is a failure to allocate resources required by the OpenCL implementation on the device.OF_ RESOURCES -
CL_OUT_if there is a failure to allocate resources required by the OpenCL implementation on the host.OF_ HOST_ MEMORY
Document Notes
For more information, see the OpenCL Specification
This page is extracted from the OpenCL Specification. Fixes and changes should be made to the Specification, not directly.