Platform class C wrapper

Overview

// global functions

DPCTL_API __dpctl_give DPCTLSyclPlatformRef
DPCTLPlatform_Copy(__dpctl_keep const DPCTLSyclPlatformRef PRef);

DPCTL_API __dpctl_give DPCTLSyclPlatformRef
DPCTLPlatform_Create(void);

DPCTL_API __dpctl_give DPCTLSyclPlatformRef
DPCTLPlatform_CreateFromSelector(__dpctl_keep const DPCTLSyclDeviceSelectorRef DSRef);

DPCTL_API void
DPCTLPlatform_Delete(__dpctl_take DPCTLSyclPlatformRef PRef);

DPCTL_API DPCTLSyclBackendType
DPCTLPlatform_GetBackend(__dpctl_keep const DPCTLSyclPlatformRef PRef);

DPCTL_API const __dpctl_give char*
DPCTLPlatform_GetName(__dpctl_keep const DPCTLSyclPlatformRef PRef);

DPCTL_API __dpctl_give DPCTLPlatformVectorRef
DPCTLPlatform_GetPlatforms(void);

DPCTL_API const __dpctl_give char*
DPCTLPlatform_GetVendor(__dpctl_keep const DPCTLSyclPlatformRef PRef);

DPCTL_API const __dpctl_give char*
DPCTLPlatform_GetVersion(__dpctl_keep const DPCTLSyclPlatformRef PRef);

Detailed Documentation

Global Functions

DPCTL_API __dpctl_give DPCTLSyclPlatformRef
DPCTLPlatform_Copy(__dpctl_keep const DPCTLSyclPlatformRef PRef)

Returns a copy of the DPCTLSyclPlatformRef object.

Parameters:

PRef

DPCTLSyclPlatformRef object to be copied.

Returns:

A new DPCTLSyclPlatformRef created by copying the passed in DPCTLSyclPlatformRef object.

DPCTL_API __dpctl_give DPCTLSyclPlatformRef
DPCTLPlatform_Create(void)

Creates a new DPCTLSyclPlatformRef for a SYCL platform constructed using SYCL’s default_selector.

Returns:

A new DPCTLSyclPlatformRef pointer wrapping a SYCL platform object.

DPCTL_API __dpctl_give DPCTLSyclPlatformRef
DPCTLPlatform_CreateFromSelector(__dpctl_keep const DPCTLSyclDeviceSelectorRef DSRef)

Creates a new DPCTLSyclPlatformRef for a SYCL platform constructed using the device_selector wrapped by DPCTLSyclDeviceSelectorRef.

Parameters:

DSRef

An opaque pointer to a SYCL device_selector object.

Returns:

A new DPCTLSyclPlatformRef pointer wrapping a SYCL platform object.

DPCTL_API void
DPCTLPlatform_Delete(__dpctl_take DPCTLSyclPlatformRef PRef)

Deletes the DPCTLSyclProgramRef pointer.

Parameters:

PRef

An opaque pointer to a sycl::platform.

DPCTL_API DPCTLSyclBackendType
DPCTLPlatform_GetBackend(__dpctl_keep const DPCTLSyclPlatformRef PRef)

Returns a DPCTLSyclBackendType enum value identifying the SYCL backend associated with the platform.

Parameters:

PRef

Opaque pointer to a sycl::platform

Returns:

A DPCTLSyclBackendType enum value identifying the SYCL backend associated with the platform.

DPCTL_API const __dpctl_give char*
DPCTLPlatform_GetName(__dpctl_keep const DPCTLSyclPlatformRef PRef)

Returns a C string for the platform name.

Parameters:

PRef

Opaque pointer to a sycl::platform

Returns:

A C string containing the name of the sycl::platform.

DPCTL_API __dpctl_give DPCTLPlatformVectorRef
DPCTLPlatform_GetPlatforms(void)

Returns an opaque pointer to a vector of SYCL platforms available on the system.

Returns:

A DPCTLPlatformVectorRef containing DPCTLSyclPlatformRef objects.

DPCTL_API const __dpctl_give char*
DPCTLPlatform_GetVendor(__dpctl_keep const DPCTLSyclPlatformRef PRef)

Returns a C string corresponding to the vendor providing the platform.

Parameters:

PRef

Opaque pointer to a sycl::platform

Returns:

A C string containing the name of the vendor provifing the platform.

DPCTL_API const __dpctl_give char*
DPCTLPlatform_GetVersion(__dpctl_keep const DPCTLSyclPlatformRef PRef)

Returns the software driver version of the sycl::platform as a C string.

Parameters:

PRef

Opaque pointer to a sycl::platform

Returns:

A C string containing the software driver version of the device associated with the platform.