.. index:: pair: group; Platform class C wrapper .. _doxid-da/dbd/group___platform_interface: Platform class C wrapper ======================== .. toctree:: :hidden: Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block // global functions :ref:`DPCTL_API` bool :ref:`DPCTLPlatform_AreEq`( :ref:`__dpctl_keep` const :ref:`DPCTLSyclPlatformRef` PRef1, :ref:`__dpctl_keep` const :ref:`DPCTLSyclPlatformRef` PRef2 ); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclPlatformRef` :ref:`DPCTLPlatform_Copy`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclPlatformRef` PRef); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclPlatformRef` :ref:`DPCTLPlatform_Create`(void); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclPlatformRef` :ref:`DPCTLPlatform_CreateFromSelector`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceSelectorRef` DSRef); :ref:`DPCTL_API` void :ref:`DPCTLPlatform_Delete`(:ref:`__dpctl_take` :ref:`DPCTLSyclPlatformRef` PRef); :ref:`DPCTL_API` :ref:`DPCTLSyclBackendType` :ref:`DPCTLPlatform_GetBackend`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclPlatformRef` PRef); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclContextRef` :ref:`DPCTLPlatform_GetDefaultContext`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclPlatformRef` PRef); :ref:`DPCTL_API` :ref:`__dpctl_give` const char* :ref:`DPCTLPlatform_GetName`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclPlatformRef` PRef); :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLPlatformVectorRef` :ref:`DPCTLPlatform_GetPlatforms`(void); :ref:`DPCTL_API` :ref:`__dpctl_give` const char* :ref:`DPCTLPlatform_GetVendor`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclPlatformRef` PRef); :ref:`DPCTL_API` :ref:`__dpctl_give` const char* :ref:`DPCTLPlatform_GetVersion`(:ref:`__dpctl_keep` const :ref:`DPCTLSyclPlatformRef` PRef); :ref:`DPCTL_API` size_t :ref:`DPCTLPlatform_Hash`(:ref:`__dpctl_keep` :ref:`DPCTLSyclPlatformRef` PRef); .. _details-da/dbd/group___platform_interface: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Global Functions ---------------- .. index:: pair: function; DPCTLPlatform_AreEq .. _doxid-da/dbd/group___platform_interface_1ga47996ef38b50c957739808330bce7d98: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` bool DPCTLPlatform_AreEq( :ref:`__dpctl_keep` const :ref:`DPCTLSyclPlatformRef` PRef1, :ref:`__dpctl_keep` const :ref:`DPCTLSyclPlatformRef` PRef2 ) Checks if two DPCTLSyclPlatformRef objects point to the same sycl::platform. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - PRef1 - First opaque pointer to a ``sycl::platform``. * - PRef2 - Second opaque pointer to a ``sycl::platform``. .. rubric:: Returns: True if the underlying sycl::platform are same, false otherwise. .. index:: pair: function; DPCTLPlatform_Copy .. _doxid-da/dbd/group___platform_interface_1ga5bddf303912d4344608af42735dfd6f8: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclPlatformRef` DPCTLPlatform_Copy(:ref:`__dpctl_keep` const :ref:`DPCTLSyclPlatformRef` PRef) Returns a copy of the DPCTLSyclPlatformRef object. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - PRef - DPCTLSyclPlatformRef object to be copied. .. rubric:: Returns: A new DPCTLSyclPlatformRef created by copying the passed in DPCTLSyclPlatformRef object. .. index:: pair: function; DPCTLPlatform_Create .. _doxid-da/dbd/group___platform_interface_1ga6b3412dfc90659a68beb778747211115: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclPlatformRef` DPCTLPlatform_Create(void) Creates a new DPCTLSyclPlatformRef for a SYCL platform constructed using SYCL's default_selector. .. rubric:: Returns: A new DPCTLSyclPlatformRef pointer wrapping a SYCL platform object. .. index:: pair: function; DPCTLPlatform_CreateFromSelector .. _doxid-da/dbd/group___platform_interface_1ga71cf26d634573b7cc86b013f65374015: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclPlatformRef` DPCTLPlatform_CreateFromSelector(:ref:`__dpctl_keep` const :ref:`DPCTLSyclDeviceSelectorRef` DSRef) Creates a new DPCTLSyclPlatformRef for a SYCL platform constructed using the dpctl_device_selector wrapped by DPCTLSyclDeviceSelectorRef. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - DSRef - An opaque pointer to a SYCL dpctl_device_selector object. .. rubric:: Returns: A new DPCTLSyclPlatformRef pointer wrapping a SYCL platform object. .. index:: pair: function; DPCTLPlatform_Delete .. _doxid-da/dbd/group___platform_interface_1gaa29d07ce2e25dda5ab2e19cba0e18be9: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` void DPCTLPlatform_Delete(:ref:`__dpctl_take` :ref:`DPCTLSyclPlatformRef` PRef) Deletes the DPCTLSyclProgramRef pointer. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - PRef - An opaque pointer to a sycl::platform. .. index:: pair: function; DPCTLPlatform_GetBackend .. _doxid-da/dbd/group___platform_interface_1ga1e33f8b1f629151fb9a20cdf983b3370: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`DPCTLSyclBackendType` DPCTLPlatform_GetBackend(:ref:`__dpctl_keep` const :ref:`DPCTLSyclPlatformRef` PRef) Returns a DPCTLSyclBackendType enum value identifying the SYCL backend associated with the platform. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - PRef - Opaque pointer to a sycl::platform .. rubric:: Returns: A DPCTLSyclBackendType enum value identifying the SYCL backend associated with the platform. .. index:: pair: function; DPCTLPlatform_GetDefaultContext .. _doxid-da/dbd/group___platform_interface_1ga37bec32a093850b5edfb231586097652: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLSyclContextRef` DPCTLPlatform_GetDefaultContext(:ref:`__dpctl_keep` const :ref:`DPCTLSyclPlatformRef` PRef) Returns a DPCTLSyclContextRef for default platform context. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - PRef - Opaque pointer to a sycl::platform .. rubric:: Returns: A DPCTLSyclContextRef value for the default platform associated with this platform. .. index:: pair: function; DPCTLPlatform_GetName .. _doxid-da/dbd/group___platform_interface_1ga5d1642698b3c0fbf5e577742447f9618: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` const char* DPCTLPlatform_GetName(:ref:`__dpctl_keep` const :ref:`DPCTLSyclPlatformRef` PRef) Returns a C string for the platform name. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - PRef - Opaque pointer to a sycl::platform .. rubric:: Returns: A C string containing the name of the sycl::platform. .. index:: pair: function; DPCTLPlatform_GetPlatforms .. _doxid-da/dbd/group___platform_interface_1gacdbf951bfb74e4578af431fa2a7063cb: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` :ref:`DPCTLPlatformVectorRef` DPCTLPlatform_GetPlatforms(void) Returns an opaque pointer to a vector of SYCL platforms available on the system. .. rubric:: Returns: A :ref:`DPCTLPlatformVectorRef ` containing :ref:`DPCTLSyclPlatformRef ` objects. .. index:: pair: function; DPCTLPlatform_GetVendor .. _doxid-da/dbd/group___platform_interface_1ga9cdd99515c9e957cc6056c97d3ee12ad: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` const char* DPCTLPlatform_GetVendor(:ref:`__dpctl_keep` const :ref:`DPCTLSyclPlatformRef` PRef) Returns a C string corresponding to the vendor providing the platform. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - PRef - Opaque pointer to a sycl::platform .. rubric:: Returns: A C string containing the name of the vendor providing the platform. .. index:: pair: function; DPCTLPlatform_GetVersion .. _doxid-da/dbd/group___platform_interface_1gae715cdc1ac7a46ae61e626600c269fb9: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` :ref:`__dpctl_give` const char* DPCTLPlatform_GetVersion(:ref:`__dpctl_keep` const :ref:`DPCTLSyclPlatformRef` PRef) Returns the software driver version of the sycl::platform as a C string. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - PRef - Opaque pointer to a sycl::platform .. rubric:: Returns: A C string containing the software driver version of the device associated with the platform. .. index:: pair: function; DPCTLPlatform_Hash .. _doxid-da/dbd/group___platform_interface_1gac7cc24c940cc4956b736a5612c4777ef: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DPCTL_API` size_t DPCTLPlatform_Hash(:ref:`__dpctl_keep` :ref:`DPCTLSyclPlatformRef` PRef) Wrapper over std::hash's operator() .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - PRef - The DPCTLSyclPlatformRef pointer. .. rubric:: Returns: Hash value of the underlying ``sycl::platform`` instance.