8ba6c62394
Change-Id: I82f5ef84eac72821214d832a41e40e0f42cf66b9
40 linhas
775 B
C
40 linhas
775 B
C
/* Modifications Copyright(C) 2022 Advanced Micro Devices, Inc.
|
|
* All rights reserved.
|
|
*/
|
|
|
|
#include <string.h>
|
|
|
|
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
|
|
#include "CL/cl.h"
|
|
#include "CL/cl_ext.h"
|
|
|
|
struct driverStubextFunc_st
|
|
{
|
|
const char *name;
|
|
void *func;
|
|
};
|
|
|
|
#define EXT_FUNC(name) { #name, (void*)(name) }
|
|
|
|
static struct driverStubextFunc_st clExtensions[] =
|
|
{
|
|
EXT_FUNC(clIcdGetPlatformIDsKHR),
|
|
};
|
|
|
|
static const int clExtensionCount = sizeof(clExtensions) / sizeof(clExtensions[0]);
|
|
|
|
CL_API_ENTRY void * CL_API_CALL
|
|
clGetExtensionFunctionAddress(const char *name)
|
|
{
|
|
int ii;
|
|
|
|
for (ii = 0; ii < clExtensionCount; ii++) {
|
|
if (!strcmp(name, clExtensions[ii].name)) {
|
|
return clExtensions[ii].func;
|
|
}
|
|
}
|
|
|
|
return NULL;
|
|
}
|
|
|