Kernel class C wrapper¶
Overview¶
// global functions DPCTL_API __dpctl_give DPCTLSyclKernelRef DPCTLKernel_Copy(__dpctl_keep const DPCTLSyclKernelRef KRef); DPCTL_API void DPCTLKernel_Delete(__dpctl_take DPCTLSyclKernelRef KRef); DPCTL_API uint32_t DPCTLKernel_GetCompileNumSubGroups(__dpctl_keep const DPCTLSyclKernelRef KRef); DPCTL_API uint32_t DPCTLKernel_GetCompileSubGroupSize(__dpctl_keep const DPCTLSyclKernelRef KRef); DPCTL_API uint32_t DPCTLKernel_GetMaxNumSubGroups(__dpctl_keep const DPCTLSyclKernelRef KRef); DPCTL_API uint32_t DPCTLKernel_GetMaxSubGroupSize(__dpctl_keep const DPCTLSyclKernelRef KRef); DPCTL_API size_t DPCTLKernel_GetNumArgs(__dpctl_keep const DPCTLSyclKernelRef KRef); DPCTL_API size_t DPCTLKernel_GetPreferredWorkGroupSizeMultiple(__dpctl_keep const DPCTLSyclKernelRef KRef); DPCTL_API size_t DPCTLKernel_GetPrivateMemSize(__dpctl_keep const DPCTLSyclKernelRef KRef); DPCTL_API size_t DPCTLKernel_GetWorkGroupSize(__dpctl_keep const DPCTLSyclKernelRef KRef);
Detailed Documentation¶
Global Functions¶
DPCTL_API __dpctl_give DPCTLSyclKernelRef DPCTLKernel_Copy(__dpctl_keep const DPCTLSyclKernelRef KRef)
Returns a copy of the DPCTLSyclKernelRef object.
Parameters:
KRef |
DPCTLSyclKernelRef object to be copied. |
Returns:
A new DPCTLSyclKernelRef created by copying the passed in DPCTLSyclKernelRef object.
DPCTL_API void DPCTLKernel_Delete(__dpctl_take DPCTLSyclKernelRef KRef)
Deletes the DPCTLSyclKernelRef after casting it to a sycl::kernel
.
Parameters:
KRef |
DPCTLSyclKernelRef pointer to a SYCL interoperability kernel. |
DPCTL_API uint32_t DPCTLKernel_GetCompileNumSubGroups(__dpctl_keep const DPCTLSyclKernelRef KRef)
!brief Wrapper around kernel::get_info<info::kernel_device_specific::compile_num_sub_groups>()
.
Parameters:
KRef |
DPCTLSyclKernelRef pointer to an SYCL interoperability kernel. |
Returns:
Returns the number of sub-groups specified by the kernel, or 0 (if not specified).
DPCTL_API uint32_t DPCTLKernel_GetCompileSubGroupSize(__dpctl_keep const DPCTLSyclKernelRef KRef)
!brief Wrapper around kernel::get_info<info::kernel_device_specific::compile_sub_group_size>()
.
Parameters:
KRef |
DPCTLSyclKernelRef pointer to an SYCL interoperability kernel. |
Returns:
Returns the required sub-group size specified by this kernel, or 0 (if not specified).
DPCTL_API uint32_t DPCTLKernel_GetMaxNumSubGroups(__dpctl_keep const DPCTLSyclKernelRef KRef)
!brief Wrapper around kernel::get_info<info::kernel_device_specific::max_num_sub_groups>()
.
Parameters:
KRef |
DPCTLSyclKernelRef pointer to an SYCL interoperability kernel. |
Returns:
Returns the maximum number of sub-groups for this kernel.
DPCTL_API uint32_t DPCTLKernel_GetMaxSubGroupSize(__dpctl_keep const DPCTLSyclKernelRef KRef)
!brief Wrapper around kernel::get_info<info::kernel_device_specific::max_sub_group_size>()
.
Parameters:
KRef |
DPCTLSyclKernelRef pointer to an SYCL interoperability kernel. |
Returns:
Returns the maximum sub-group size for this kernel.
DPCTL_API size_t DPCTLKernel_GetNumArgs(__dpctl_keep const DPCTLSyclKernelRef KRef)
Returns the number of arguments for the sycl interoperability kernel.
Parameters:
KRef |
DPCTLSyclKernelRef pointer to a SYCL interoperability kernel. |
Returns:
Returns the number of arguments for the interoperability kernel.
DPCTL_API size_t DPCTLKernel_GetPreferredWorkGroupSizeMultiple(__dpctl_keep const DPCTLSyclKernelRef KRef)
!brief Wrapper around kernel::get_info<info::kernel_device_specific::preferred_work_group_size_multiple>()
.
Parameters:
KRef |
DPCTLSyclKernelRef pointer to a SYCL interoperability kernel. |
Returns:
Returns a value, of which work-group size is preferred to be a multiple, for executing a kernel on the device it was built for.
DPCTL_API size_t DPCTLKernel_GetPrivateMemSize(__dpctl_keep const DPCTLSyclKernelRef KRef)
!brief Wrapper around kernel::get_info<info::kernel_device_specific::private_mem_size>()
.
Parameters:
KRef |
DPCTLSyclKernelRef pointer to a SYCL interoperability kernel. |
Returns:
Returns the minimum amount of private memory, in bytes, used by each work-item in the kernel.
DPCTL_API size_t DPCTLKernel_GetWorkGroupSize(__dpctl_keep const DPCTLSyclKernelRef KRef)
!brief Wrapper around kernel::get_info<info::kernel_device_specific::work_group_size>()
.
Parameters:
KRef |
DPCTLSyclKernelRef pointer to a SYCL interoperability kernel. |
Returns:
Returns the maximum number of work-items in a work-group that can be used to execute a kernel on the device it was built for.