Implemented b3OpenCLUtils::setCachePath

Also made kernel caching work on Mac OSX (and likely Linux, needs testing before enabling)
This commit is contained in:
Erwin Coumans
2013-06-07 15:04:46 -07:00
parent 9fe48d887d
commit afecad3ee4
3 changed files with 119 additions and 68 deletions

View File

@@ -53,7 +53,10 @@ cl_platform_id b3OpenCLUtils_getPlatform(int nr, cl_int* pErrNum);
void b3OpenCLUtils_printPlatformInfo(cl_platform_id platform);
const char* b3OpenCLUtils_getSdkVendorName();
///set the path (directory/folder) where the compiled OpenCL kernel are stored
void b3OpenCLUtils_setCachePath(const char* path);
cl_context b3OpenCLUtils_createContextFromPlatform(cl_platform_id platform, cl_device_type deviceType, cl_int* pErrNum, void* pGLCtx , void* pGLDC ,int preferredDeviceIndex , int preferredPlatformIndex);
#ifdef __cplusplus
@@ -173,6 +176,10 @@ struct b3OpenCLUtils
{
return b3OpenCLUtils_createContextFromPlatform(platform, deviceType, pErrNum, pGLCtx,pGLDC,preferredDeviceIndex, preferredPlatformIndex);
}
static void setCachePath(const char* path)
{
b3OpenCLUtils_setCachePath(path);
}
};
#endif //__cplusplus