.. index:: pair: group; Device class C wrapper .. _doxid-db/dd1/group___device_interface: Device class C wrapper ====================== .. toctree:: :hidden: Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block // global functions :ref:`DPCTL_API` bool :ref:`DPCTLDevice_AreEq`( :ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef1, :ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef2 ); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclDeviceRef` :ref:`DPCTLDevice_Copy`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclDeviceRef` :ref:`DPCTLDevice_Create`(void); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclDeviceRef` :ref:`DPCTLDevice_CreateFromSelector`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceSelectorRef` DSRef); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLDeviceVectorRef` :ref:`DPCTLDevice_CreateSubDevicesByAffinity`( :ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef, :ref:`DPCTLPartitionAffinityDomainType` PartAffDomTy ); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLDeviceVectorRef` :ref:`DPCTLDevice_CreateSubDevicesByCounts`( :ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef, :ref:`__dpctl_keep` size_t* counts, size_t ncounts ); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLDeviceVectorRef` :ref:`DPCTLDevice_CreateSubDevicesEqually`( :ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef, size_t count ); :ref:`DPCTL_API` void :ref:`DPCTLDevice_Delete`(:ref:`__dpctl_take` :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` :ref:`DPCTLSyclBackendType` :ref:`DPCTLDevice_GetBackend`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` :ref:`DPCTLSyclDeviceType` :ref:`DPCTLDevice_GetDeviceType`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` :ref:`__dpctl_give` const char* :ref:`DPCTLDevice_GetDriverVersion`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` uint64_t :ref:`DPCTLDevice_GetGlobalMemSize`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` uint64_t :ref:`DPCTLDevice_GetLocalMemSize`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` uint32_t :ref:`DPCTLDevice_GetMaxComputeUnits`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` uint32_t :ref:`DPCTLDevice_GetMaxNumSubGroups`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` size_t :ref:`DPCTLDevice_GetMaxWorkGroupSize`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` uint32_t :ref:`DPCTLDevice_GetMaxWorkItemDims`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` :ref:`__dpctl_keep` size_t* :ref:`DPCTLDevice_GetMaxWorkItemSizes1d`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` :ref:`__dpctl_keep` size_t* :ref:`DPCTLDevice_GetMaxWorkItemSizes2d`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` :ref:`__dpctl_keep` size_t* :ref:`DPCTLDevice_GetMaxWorkItemSizes3d`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` :ref:`__dpctl_give` const char* :ref:`DPCTLDevice_GetName`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` uint32_t :ref:`DPCTLDevice_GetNativeVectorWidthChar`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` uint32_t :ref:`DPCTLDevice_GetNativeVectorWidthDouble`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` uint32_t :ref:`DPCTLDevice_GetNativeVectorWidthFloat`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` uint32_t :ref:`DPCTLDevice_GetNativeVectorWidthHalf`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` uint32_t :ref:`DPCTLDevice_GetNativeVectorWidthInt`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` uint32_t :ref:`DPCTLDevice_GetNativeVectorWidthLong`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` uint32_t :ref:`DPCTLDevice_GetNativeVectorWidthShort`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclPlatformRef` :ref:`DPCTLDevice_GetPlatform`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` uint32_t :ref:`DPCTLDevice_GetPreferredVectorWidthChar`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` uint32_t :ref:`DPCTLDevice_GetPreferredVectorWidthDouble`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` uint32_t :ref:`DPCTLDevice_GetPreferredVectorWidthFloat`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` uint32_t :ref:`DPCTLDevice_GetPreferredVectorWidthHalf`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` uint32_t :ref:`DPCTLDevice_GetPreferredVectorWidthInt`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` uint32_t :ref:`DPCTLDevice_GetPreferredVectorWidthLong`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` uint32_t :ref:`DPCTLDevice_GetPreferredVectorWidthShort`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` bool :ref:`DPCTLDevice_GetSubGroupIndependentForwardProgress`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` :ref:`__dpctl_keep` size_t* :ref:`DPCTLDevice_GetSubGroupSizes`( :ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef, size_t* res_len ); :ref:`DPCTL_API` :ref:`__dpctl_give` const char* :ref:`DPCTLDevice_GetVendor`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` bool :ref:`DPCTLDevice_HasAspect`( :ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef, :ref:`DPCTLSyclAspectType` AT ); :ref:`DPCTL_API` bool :ref:`DPCTLDevice_IsAccelerator`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` bool :ref:`DPCTLDevice_IsCPU`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); :ref:`DPCTL_API` bool :ref:`DPCTLDevice_IsGPU`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef); .. _details-db/dd1/group___device_interface: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Global Functions ---------------- .. index:: pair: function; DPCTLDevice_AreEq .. _doxid-db/dd1/group___device_interface_1gaba5f155a106aa09f770639cc22ee0ddd: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` bool DPCTLDevice_AreEq( :ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef1, :ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef2 ) Checks if two DPCTLSyclDeviceRef objects point to the same sycl::device. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef1 - First opaque pointer to a ``sycl::device``. * - DRef2 - Second opaque pointer to a ``sycl::device``. .. rubric:: Returns: True if the underlying sycl::device are same, false otherwise. .. index:: pair: function; DPCTLDevice_Copy .. _doxid-db/dd1/group___device_interface_1ga02c7b900248b1aac0fe096c874c71c2b: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclDeviceRef` DPCTLDevice_Copy(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Returns a copy of the DPCTLSyclDeviceRef object. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - DPCTLSyclDeviceRef object to be copied. .. rubric:: Returns: A new DPCTLSyclDeviceRef created by copying the passed in DPCTLSyclDeviceRef object. .. index:: pair: function; DPCTLDevice_Create .. _doxid-db/dd1/group___device_interface_1gaa0f24449bcf7721e2a23cc6b2c1d291a: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclDeviceRef` DPCTLDevice_Create(void) Returns a new DPCTLSyclDeviceRef opaque object wrapping a SYCL device instance as a host device. .. rubric:: Returns: An opaque pointer to a ``sycl::device`` created as an instance of the host device. .. index:: pair: function; DPCTLDevice_CreateFromSelector .. _doxid-db/dd1/group___device_interface_1ga371463122c4ec271be68364d1e9a284d: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclDeviceRef` DPCTLDevice_CreateFromSelector(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceSelectorRef` DSRef) Returns a new DPCTLSyclDeviceRef opaque object created using the provided device_selector. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DSRef - An opaque pointer to a ``sycl::device_selector``. .. rubric:: Returns: Returns an opaque pointer to a SYCL device created using the device_selector, if the requested device could not be created a nullptr is returned. .. index:: pair: function; DPCTLDevice_CreateSubDevicesByAffinity .. _doxid-db/dd1/group___device_interface_1gae0b93c3e13a3882ba5599a7321a2253c: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLDeviceVectorRef` DPCTLDevice_CreateSubDevicesByAffinity( :ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef, :ref:`DPCTLPartitionAffinityDomainType` PartAffDomTy ) Returns a vector of sub-devices partitioned from this SYCL device by affinity domain based on the domain parameter. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` * - PartAffDomTy - A DPCTLPartitionAffinityDomainType enum value .. rubric:: Returns: A :ref:`DPCTLDeviceVectorRef ` containing :ref:`DPCTLSyclDeviceRef ` objects .. index:: pair: function; DPCTLDevice_CreateSubDevicesByCounts .. _doxid-db/dd1/group___device_interface_1ga794e3f46e0c4805e6eb56b55524fd3f9: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLDeviceVectorRef` DPCTLDevice_CreateSubDevicesByCounts( :ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef, :ref:`__dpctl_keep` size_t* counts, size_t ncounts ) Returns a vector of sub devices partitioned from this SYCL device based on the counts parameter. For each non-zero value M in the counts vector, a sub device with M compute units is created. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` * - counts - Array with count compute units that need to contains in subdevices * - ncounts - Number of counts .. rubric:: Returns: A :ref:`DPCTLDeviceVectorRef ` containing :ref:`DPCTLSyclDeviceRef ` objects .. index:: pair: function; DPCTLDevice_CreateSubDevicesEqually .. _doxid-db/dd1/group___device_interface_1ga75e3383f16c69d7ccb8377609e61964a: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLDeviceVectorRef` DPCTLDevice_CreateSubDevicesEqually( :ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef, size_t count ) Returns a vector of sub devices partitioned from this SYCL device based on the count parameter. The returned vector contains as many sub devices as can be created such that each sub device contains count compute units. If the device’s total number of compute units is not evenly divided by count, then the remaining compute units are not included in any of the sub devices. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` * - count - Count compute units that need to contains in subdevices .. rubric:: Returns: A :ref:`DPCTLDeviceVectorRef ` containing :ref:`DPCTLSyclDeviceRef ` objects .. index:: pair: function; DPCTLDevice_Delete .. _doxid-db/dd1/group___device_interface_1ga062853b5082debfcae7d7b840907b667: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` void DPCTLDevice_Delete(:ref:`__dpctl_take` :ref:`DPCTLSyclDeviceRef` DRef) Deletes a DPCTLSyclDeviceRef pointer after casting to to sycl::device. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - The DPCTLSyclDeviceRef pointer to be freed. .. index:: pair: function; DPCTLDevice_GetBackend .. _doxid-db/dd1/group___device_interface_1gac031eb6d9209db0c88c545e221d37692: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`DPCTLSyclBackendType` DPCTLDevice_GetBackend(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Returns the backend for the device. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: A DPCTLSyclBackendType enum value representing the ``sycl::backend`` for the device. .. index:: pair: function; DPCTLDevice_GetDeviceType .. _doxid-db/dd1/group___device_interface_1ga312596705e48023c62735ca1fe7a380f: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`DPCTLSyclDeviceType` DPCTLDevice_GetDeviceType(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Returns the DPCTLSyclDeviceType enum value for the DPCTLSyclDeviceRef argument. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a sycl::device .. rubric:: Returns: The DPCTLSyclDeviceType value corresponding to the device. .. index:: pair: function; DPCTLDevice_GetDriverVersion .. _doxid-db/dd1/group___device_interface_1ga523d5188a8af13200a5665c49f96d8d1: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` const char* DPCTLDevice_GetDriverVersion(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Returns the OpenCL software driver version as a C string. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: A C string in the form major_number.minor.number that corresponds to the OpenCL driver version if this is a OpenCL device. .. index:: pair: function; DPCTLDevice_GetGlobalMemSize .. _doxid-db/dd1/group___device_interface_1gaa0035ff7868faf6763f1543b14dc5dee: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` uint64_t DPCTLDevice_GetGlobalMemSize(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Wrapper over device.get_info(). .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: Returns the valid result if device exists else returns 0. .. index:: pair: function; DPCTLDevice_GetLocalMemSize .. _doxid-db/dd1/group___device_interface_1ga6b9c79792534de95e407fc57c4f3a559: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` uint64_t DPCTLDevice_GetLocalMemSize(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Wrapper over device.get_info(). .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: Returns the valid result if device exists else returns 0. .. index:: pair: function; DPCTLDevice_GetMaxComputeUnits .. _doxid-db/dd1/group___device_interface_1gac9635668177d01284e64d1d4373a391a: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` uint32_t DPCTLDevice_GetMaxComputeUnits(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Wrapper over device.get_info(). .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: Returns the valid result if device exists else returns 0. .. index:: pair: function; DPCTLDevice_GetMaxNumSubGroups .. _doxid-db/dd1/group___device_interface_1ga6c5a99a6da732f5cee47a09ff1559a30: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` uint32_t DPCTLDevice_GetMaxNumSubGroups(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Wrapper over device.get_info. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: Returns the valid result if device exists else returns 0. .. index:: pair: function; DPCTLDevice_GetMaxWorkGroupSize .. _doxid-db/dd1/group___device_interface_1gaffdc9aeff99885627cd26364df7479de: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` size_t DPCTLDevice_GetMaxWorkGroupSize(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Wrapper for get_info(). .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: Returns the valid result if device exists else returns 0. .. index:: pair: function; DPCTLDevice_GetMaxWorkItemDims .. _doxid-db/dd1/group___device_interface_1ga365748d856fa3af3fe3ed288bb19c55a: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` uint32_t DPCTLDevice_GetMaxWorkItemDims(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Wrapper for get_info(). .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: Returns the valid result if device exists else returns 0. .. index:: pair: function; DPCTLDevice_GetMaxWorkItemSizes1d .. _doxid-db/dd1/group___device_interface_1gaa78a3bce74306fb72c9e3fd9023f8e7d: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_keep` size_t* DPCTLDevice_GetMaxWorkItemSizes1d(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Wrapper for get_info>(). .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: Returns the valid result if device exists else returns NULL. .. index:: pair: function; DPCTLDevice_GetMaxWorkItemSizes2d .. _doxid-db/dd1/group___device_interface_1ga1b2a59d26b76f44c13e6396906ebd182: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_keep` size_t* DPCTLDevice_GetMaxWorkItemSizes2d(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Wrapper for get_info>(). .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: Returns the valid result if device exists else returns NULL. .. index:: pair: function; DPCTLDevice_GetMaxWorkItemSizes3d .. _doxid-db/dd1/group___device_interface_1ga21f1e0cfb75b6ba9dd8ad2c87573e769: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_keep` size_t* DPCTLDevice_GetMaxWorkItemSizes3d(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Wrapper for get_info>(). .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: Returns the valid result if device exists else returns NULL. .. index:: pair: function; DPCTLDevice_GetName .. _doxid-db/dd1/group___device_interface_1ga636d37321050fd9924a73a19214ce81f: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` const char* DPCTLDevice_GetName(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Returns a C string for the device name. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: A C string containing the OpenCL device name. .. index:: pair: function; DPCTLDevice_GetNativeVectorWidthChar .. _doxid-db/dd1/group___device_interface_1ga151239c1d7f628ddfafcc6a04f1b1b65: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` uint32_t DPCTLDevice_GetNativeVectorWidthChar(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Wrapper over device.get_info. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: Returns the native ISA vector width size for built-in scalar types that can be put into vectors. .. index:: pair: function; DPCTLDevice_GetNativeVectorWidthDouble .. _doxid-db/dd1/group___device_interface_1gadb8950fc6d41c7f39938dce3f9ee58e0: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` uint32_t DPCTLDevice_GetNativeVectorWidthDouble(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Wrapper over device.get_info. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: Returns the native ISA vector width size for built-in scalar types that can be put into vectors. .. index:: pair: function; DPCTLDevice_GetNativeVectorWidthFloat .. _doxid-db/dd1/group___device_interface_1gaf642a805664cc56175850a2b4c807aa8: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` uint32_t DPCTLDevice_GetNativeVectorWidthFloat(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Wrapper over device.get_info. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: Returns the native ISA vector width size for built-in scalar type. .. index:: pair: function; DPCTLDevice_GetNativeVectorWidthHalf .. _doxid-db/dd1/group___device_interface_1ga0fdf320b7958405c8fcbcdaded3604e4: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` uint32_t DPCTLDevice_GetNativeVectorWidthHalf(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Wrapper over ``device.get_info``. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: Returns the native ISA vector width size for built-in scalar types that can be put into vectors. .. index:: pair: function; DPCTLDevice_GetNativeVectorWidthInt .. _doxid-db/dd1/group___device_interface_1gaea1e33bf9308243da2d960127ba263ae: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` uint32_t DPCTLDevice_GetNativeVectorWidthInt(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Wrapper over device.get_info. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: Returns the native ISA vector width size for built-in scalar types that can be put into vectors. .. index:: pair: function; DPCTLDevice_GetNativeVectorWidthLong .. _doxid-db/dd1/group___device_interface_1ga25682e53c3aa02c22e4d6b271ab0755a: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` uint32_t DPCTLDevice_GetNativeVectorWidthLong(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Wrapper over device.get_info. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: Returns the native ISA vector width size for built-in scalar types that can be put into vectors. .. index:: pair: function; DPCTLDevice_GetNativeVectorWidthShort .. _doxid-db/dd1/group___device_interface_1ga49c104020f5c922c696fb30847d632e7: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` uint32_t DPCTLDevice_GetNativeVectorWidthShort(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Wrapper over device.get_info. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: Returns the native ISA vector width size for built-in scalar types that can be put into vectors. .. index:: pair: function; DPCTLDevice_GetPlatform .. _doxid-db/dd1/group___device_interface_1ga7a5b8354f2f4937eb0b6229ba8436ecc: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclPlatformRef` DPCTLDevice_GetPlatform(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Returns the ``sycl::platform`` for the device as DPCTLSyclPlatformRef opaque pointer. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: An opaque pointer to the sycl::platform for the device. .. index:: pair: function; DPCTLDevice_GetPreferredVectorWidthChar .. _doxid-db/dd1/group___device_interface_1ga3e46c34f5ec44d1a40f3fcd80452a526: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` uint32_t DPCTLDevice_GetPreferredVectorWidthChar(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Wrapper over device.get_info. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: Returns the preferred native vector width size for built-in scalar types that can be put into vectors. .. index:: pair: function; DPCTLDevice_GetPreferredVectorWidthDouble .. _doxid-db/dd1/group___device_interface_1gafa9c9d2c7e8c69f5ee48af4023cdef42: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` uint32_t DPCTLDevice_GetPreferredVectorWidthDouble(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Wrapper over device.get_info. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: Returns the preferred native vector width size for built-in scalar types that can be put into vectors. .. index:: pair: function; DPCTLDevice_GetPreferredVectorWidthFloat .. _doxid-db/dd1/group___device_interface_1ga24e82d7e0ebb66ce127f303309acb599: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` uint32_t DPCTLDevice_GetPreferredVectorWidthFloat(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Wrapper over device.get_info. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: Returns the preferred native vector width size for built-in scalar type. .. index:: pair: function; DPCTLDevice_GetPreferredVectorWidthHalf .. _doxid-db/dd1/group___device_interface_1ga6c7c492ae186724113bb5b3397cba77e: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` uint32_t DPCTLDevice_GetPreferredVectorWidthHalf(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Wrapper over ``device.get_info``. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: Returns the preferred native vector width size for built-in scalar types that can be put into vectors. .. index:: pair: function; DPCTLDevice_GetPreferredVectorWidthInt .. _doxid-db/dd1/group___device_interface_1gaf43ca0045d4f4ebd0abd85a0c1b7dd47: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` uint32_t DPCTLDevice_GetPreferredVectorWidthInt(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Wrapper over device.get_info. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: Returns the preferred native vector width size for built-in scalar types that can be put into vectors. .. index:: pair: function; DPCTLDevice_GetPreferredVectorWidthLong .. _doxid-db/dd1/group___device_interface_1ga76f48effcd21089c077673ccdfb615f9: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` uint32_t DPCTLDevice_GetPreferredVectorWidthLong(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Wrapper over device.get_info. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: Returns the preferred native vector width size for built-in scalar types that can be put into vectors. .. index:: pair: function; DPCTLDevice_GetPreferredVectorWidthShort .. _doxid-db/dd1/group___device_interface_1gab23c05c90e4b3a3417253e52b5d88290: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` uint32_t DPCTLDevice_GetPreferredVectorWidthShort(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Wrapper over device.get_info. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: Returns the preferred native vector width size for built-in scalar types that can be put into vectors. .. index:: pair: function; DPCTLDevice_GetSubGroupIndependentForwardProgress .. _doxid-db/dd1/group___device_interface_1ga04b9c4bc38af587f9498ec9b39152e8f: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` bool DPCTLDevice_GetSubGroupIndependentForwardProgress(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Wrapper over device.get_info. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: Returns true if the device supports independent forward progress of sub-groups with respect to other sub-groups in the same work-group. .. index:: pair: function; DPCTLDevice_GetSubGroupSizes .. _doxid-db/dd1/group___device_interface_1ga6172290a95990b1ff6f5e64ef3d6e391: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_keep` size_t* DPCTLDevice_GetSubGroupSizes( :ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef, size_t* res_len ) Wrapper for get_info(). .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` * - res_len - Populated with size of the returned array .. rubric:: Returns: Returns the valid result if device exists else returns NULL. .. index:: pair: function; DPCTLDevice_GetVendor .. _doxid-db/dd1/group___device_interface_1ga8fa7177e41638ba09b06cf5982f77522: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` const char* DPCTLDevice_GetVendor(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Returns a C string corresponding to the vendor name. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: A C string containing the OpenCL device vendor name. .. index:: pair: function; DPCTLDevice_HasAspect .. _doxid-db/dd1/group___device_interface_1gada8dabfcfaf6a76079dd64fdf07d19a2: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` bool DPCTLDevice_HasAspect( :ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef, :ref:`DPCTLSyclAspectType` AT ) Checks if device has aspect. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` * - AT - DPCTLSyclAspectType of ``device::aspect``. .. rubric:: Returns: True if sycl::device has device::aspect, else false. .. index:: pair: function; DPCTLDevice_IsAccelerator .. _doxid-db/dd1/group___device_interface_1ga00b3410f618ec90c88a3d892b62e3409: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` bool DPCTLDevice_IsAccelerator(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Returns true if this SYCL device is an OpenCL device and the device type is ``sycl::info::device_type::accelerator``. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: True if the device type is an accelerator, else False. .. index:: pair: function; DPCTLDevice_IsCPU .. _doxid-db/dd1/group___device_interface_1gab5f205e2cc7e3112c6265c0ffdffaa57: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` bool DPCTLDevice_IsCPU(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Returns true if this SYCL device is an OpenCL device and the device type is ``sycl::info::device_type::cpu``. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: True if the device type is a cpu, else False. .. index:: pair: function; DPCTLDevice_IsGPU .. _doxid-db/dd1/group___device_interface_1gaf8f14aedc1fd3b836bd07c2e4be5d541: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` bool DPCTLDevice_IsGPU(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceRef` DRef) Returns true if this SYCL device is an OpenCL device and the device type is ``sycl::info::device_type::gpu``. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DRef - Opaque pointer to a ``sycl::device`` .. rubric:: Returns: True if the device type is a gpu, else False.