Platform class helper functions¶
Overview¶
Helper functions for sycl::platform
objects that do not directly map to any sycl::platform
member function. More…
// typedefs typedef struct DPCTLPlatformVector* DPCTLPlatformVectorRef; // global functions DPCTL_API __dpctl_give const char* DPCTLPlatformMgr_GetInfo( __dpctl_keep const DPCTLSyclPlatformRef PRef, size_t verbosity ); DPCTL_API void DPCTLPlatformMgr_PrintInfo( __dpctl_keep const DPCTLSyclPlatformRef PRef, size_t verbosity ); void DPCTLPlatformVector_Clear(DPCTLPlatformVectorRef VRef); DPCTLPlatformVectorRef DPCTLPlatformVector_Create(void); DPCTLPlatformVectorRef DPCTLPlatformVector_CreateFromArray( size_t len, DPCTLSyclPlatformRef* elems ); void DPCTLPlatformVector_Delete(DPCTLPlatformVectorRef VRef); DPCTLSyclPlatformRef DPCTLPlatformVector_GetAt( DPCTLPlatformVectorRef VRef, size_t index ); size_t DPCTLPlatformVector_Size(DPCTLPlatformVectorRef VRef);
Detailed Documentation¶
Helper functions for sycl::platform
objects that do not directly map to any sycl::platform
member function.
Global Functions¶
DPCTL_API __dpctl_give const char* DPCTLPlatformMgr_GetInfo( __dpctl_keep const DPCTLSyclPlatformRef PRef, size_t verbosity )
Returns a set of platform info attributes as a string.
The helper function is used to get metadata about a given platform. The amount of information received is controlled by the verbosity level.
Verbosity level 0: Returns only the name of the platform. Verbosity level 1: Returns the name, version, vendor, backend, number of devices in the platform. Verbosity level 2: Returns everything in level 1 and also returns the name, version, and filter string for each device in the platform.
Parameters:
PRef |
A DPCTLSyclPlatformRef opaque pointer. |
verbosity |
Verbosity level to control how much information is printed out. |
Returns:
A formatted C string capturing the information about the sycl::platform argument.
DPCTL_API void DPCTLPlatformMgr_PrintInfo( __dpctl_keep const DPCTLSyclPlatformRef PRef, size_t verbosity )
Prints out information about the sycl::platform
argument.
The helper function is used to print metadata about a given platform. The amount of information printed out is controlled by the verbosity level.
Verbosity level 0: Prints only the name of the platform. Verbosity level 1: Prints the name, version, vendor, backend, number of devices in the platform. Verbosity level 2: Prints everything in level 1 and also prints the name, version, and filter string for each device in the platform.
Parameters:
PRef |
A DPCTLSyclPlatformRef opaque pointer. |
verbosity |
Verbosity level to control how much information is printed out. |
void DPCTLPlatformVector_Clear(DPCTLPlatformVectorRef VRef)
Delete all the elements of the std::vector.
Parameters:
VRef |
Opaque pointer to a vector. |
DPCTLPlatformVectorRef DPCTLPlatformVector_Create(void)
Create an opaque pointer to a std::vector of opaque pointers wrapping the SYCL data type.
Returns:
Returns a new opaque pointer to a vector.
DPCTLPlatformVectorRef DPCTLPlatformVector_CreateFromArray( size_t len, DPCTLSyclPlatformRef* elems )
Create an opaque pointer to a std::vector created from the input raw array. The elements of the input array are deep copied before inserting the copies into the vector.
Parameters:
len |
Number of elements in the input array. |
elems |
A C array whose elements will be copied into the returned vector. |
Returns:
Returns a new opaque pointer to a vector.
void DPCTLPlatformVector_Delete(DPCTLPlatformVectorRef VRef)
Delete all elements in the vector and then delete the vector.
Parameters:
VRef |
Opaque pointer to a vector to be deleted. |
DPCTLSyclPlatformRef DPCTLPlatformVector_GetAt( DPCTLPlatformVectorRef VRef, size_t index )
Returns the element at the specified index.
Parameters:
VRef |
Opaque pointer to a vector. |
index |
The index position of the element to be returned. |
Returns:
The element at the specified position, if the index position is out of bounds then a nullptr is returned.
size_t DPCTLPlatformVector_Size(DPCTLPlatformVectorRef VRef)
Returns the number of elements in the vector.
Parameters:
VRef |
Opaque pointer to a vector. |
Returns:
The current size of the vector.