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 void
DPCTLPlatformMgr_PrintInfo(__dpctl_keep const DPCTLSyclPlatformRef PRef);

DPCTL_API void
DPCTLPlatformVector_Clear(__dpctl_keep DPCTLPlatformVectorRef VRef);

__dpctl_give DPCTLPlatformVectorRef
DPCTLPlatformVector_Create();

DPCTL_API __dpctl_give DPCTLPlatformVectorRef
DPCTLPlatformVector_CreateFromArray(
    size_t len,
    __dpctl_keep DPCTLSyclPlatformRef* elems
    );

DPCTL_API void
DPCTLPlatformVector_Delete(__dpctl_take DPCTLPlatformVectorRef VRef);

DPCTL_API __dpctl_give DPCTLSyclPlatformRef
DPCTLPlatformVector_GetAt(
    __dpctl_keep DPCTLPlatformVectorRef VRef,
    size_t index
    );

DPCTL_API size_t
DPCTLPlatformVector_Size(__dpctl_keep 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 void
DPCTLPlatformMgr_PrintInfo(__dpctl_keep const DPCTLSyclPlatformRef PRef)

Prints out information about the sycl::platform argument.

Parameters:

PRef

A DPCTLSyclPlatformRef opaque pointer.

DPCTL_API void
DPCTLPlatformVector_Clear(__dpctl_keep DPCTLPlatformVectorRef VRef)

Delete all the elements of the std::vector.

Parameters:

VRef

Opaque pointer to a vector.

__dpctl_give DPCTLPlatformVectorRef
DPCTLPlatformVector_Create()

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.

DPCTL_API __dpctl_give DPCTLPlatformVectorRef
DPCTLPlatformVector_CreateFromArray(
    size_t len,
    __dpctl_keep 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.

DPCTL_API void
DPCTLPlatformVector_Delete(__dpctl_take DPCTLPlatformVectorRef VRef)

Delete all elements in the vector and then delete the vector.

Parameters:

VRef

Opaque pointer to a vector to be deleted.

DPCTL_API __dpctl_give DPCTLSyclPlatformRef
DPCTLPlatformVector_GetAt(
    __dpctl_keep DPCTLPlatformVectorRef VRef,
    size_t index
    )

Returns the element at the specified index.

Parameters:

VRef

Opaque pointer to a vector.

index

The index postion of the element to be returned.

Returns:

The element at the specified postion, if the index position is out of bounds then a nullptr is returned.

DPCTL_API size_t
DPCTLPlatformVector_Size(__dpctl_keep DPCTLPlatformVectorRef VRef)

Returns the number of elements in the vector.

Parameters:

VRef

Opaque pointer to a vector.

Returns:

The current size of the vector.