Device selection¶
Overview¶
// global functions DPCTL_API __dpctl_give DPCTLSyclDeviceSelectorRef DPCTLAcceleratorSelector_Create(void); DPCTL_API __dpctl_give DPCTLSyclDeviceSelectorRef DPCTLCPUSelector_Create(void); DPCTL_API __dpctl_give DPCTLSyclDeviceSelectorRef DPCTLDefaultSelector_Create(void); DPCTL_API void DPCTLDeviceSelector_Delete(__dpctl_take DPCTLSyclDeviceSelectorRef DSRef); DPCTL_API int DPCTLDeviceSelector_Score( __dpctl_keep DPCTLSyclDeviceSelectorRef DSRef, __dpctl_keep DPCTLSyclDeviceRef DRef ); DPCTL_API __dpctl_give DPCTLSyclDeviceSelectorRef DPCTLFilterSelector_Create(__dpctl_keep const char* filter_str); DPCTL_API __dpctl_give DPCTLSyclDeviceSelectorRef DPCTLGPUSelector_Create(void);
Detailed Documentation¶
Global Functions¶
DPCTL_API __dpctl_give DPCTLSyclDeviceSelectorRef DPCTLAcceleratorSelector_Create(void)
Returns an opaque wrapper for sycl::accelerator_selector object.
Returns:
An opaque pointer to a sycl::accelerator_selector object.
DPCTL_API __dpctl_give DPCTLSyclDeviceSelectorRef DPCTLCPUSelector_Create(void)
Returns an opaque wrapper for sycl::cpu_selector object.
Returns:
An opaque pointer to a sycl::cpu_selector object.
DPCTL_API __dpctl_give DPCTLSyclDeviceSelectorRef DPCTLDefaultSelector_Create(void)
Returns an opaque wrapper for sycl::default_selector object.
Returns:
An opaque pointer to a sycl::default_selector object.
DPCTL_API void DPCTLDeviceSelector_Delete(__dpctl_take DPCTLSyclDeviceSelectorRef DSRef)
Deletes the DPCTLSyclDeviceSelectorRef after casting it to a sycl::device_selector.
Parameters:
DSRef |
An opaque DPCTLSyclDeviceSelectorRef pointer that would be freed. |
DPCTL_API int DPCTLDeviceSelector_Score( __dpctl_keep DPCTLSyclDeviceSelectorRef DSRef, __dpctl_keep DPCTLSyclDeviceRef DRef )
Scores the device specified by DRef by device selector specified by DSRef.
Parameters:
DSRef |
An opaque DPCTLSyclDeviceSelectorRef pointer. |
DRef |
An opaque DPCTLSyclDeviceRef pointer. |
Returns:
A integer score. The negative value indicates select rejected the device.
DPCTL_API __dpctl_give DPCTLSyclDeviceSelectorRef DPCTLFilterSelector_Create(__dpctl_keep const char* filter_str)
Returns an opaque wrapper for sycl::ext::oneapi::filter_selector object based on the passed in filter string.
Parameters:
filter_str |
A C string providing a filter based on which to create a device selector. |
Returns:
An opaque pointer to a sycl::ext::oneapi::filter_selector object.
DPCTL_API __dpctl_give DPCTLSyclDeviceSelectorRef DPCTLGPUSelector_Create(void)
Returns an opaque wrapper for dpctl_gpu_selector object.
Returns:
An opaque pointer to a dpctl_gpu_selector object.