Visible to Intel only — GUID: ute1521467362540
Ixiasoft
Visible to Intel only — GUID: ute1521467362540
Ixiasoft
6.4. Accessing Custom Platform-Specific Functions
The clGetBoardExtensionFunctionAddressIntelFPGA extension specifies an API that retrieves a pointer to a user-accessible function from the Custom Platform.
Definitions of the extension interfaces are available in the INTELFPGAOCLSDKROOT/host/include/CL/cl_ext.h file.
void* clGetBoardExtensionFunctionAddressIntelFPGA (
const char* function_name,
cl_device_id device
);
Where:
function_name is the name of the user-accessible function that your Custom Platform vendor provides,
and
device is the device ID returned by the clGetDeviceIDs function.
To access the clGetBoardExtensionFunctionAddressIntelFPGA API via the Installable Client Driver (ICD), ensure that the ICD extension API clGetExtensionFunctionAddressIntelFPGA retrieves the pointer to the clGetBoardExtensionFunctionAddressIntelFPGA API first.
The following code example shows how you can access the Custom Platform-specific function via ICD:
clGetBoardExtensionFunctionAddressIntelFPGA_fn
clGetBoardExtensionFunctionAddressIntelFPGA =
(clGetBoardExtensionFunctionAddressIntelFPGA_fn)
clGetExtensionFunctionAddressForPlatform
(platform, "clGetBoardExtensionFunctionAddressIntelFPGA");
if (clGetBoardExtensionFunctionAddressIntelFPGA == NULL){
printf ("Failed to get
clGetBoardExtensionFunctionAddressIntelFPGA\n");
}
void * board_extension_function_ptr =
clGetBoardExtensionFunctionAddressIntelFPGA("function_name",device_id);