fix crash in Test_BitonicSort
This commit is contained in:
@@ -69,6 +69,8 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
cl_context context = b3OpenCLUtils::createContextFromPlatform(platform,deviceType,&ciErrNum);
|
cl_context context = b3OpenCLUtils::createContextFromPlatform(platform,deviceType,&ciErrNum);
|
||||||
|
|
||||||
|
if (context)
|
||||||
|
{
|
||||||
int numDevices = b3OpenCLUtils::getNumDevices(context);
|
int numDevices = b3OpenCLUtils::getNumDevices(context);
|
||||||
printf("Num Devices = %d\n", numDevices);
|
printf("Num Devices = %d\n", numDevices);
|
||||||
for (int j=0;j<numDevices;j++)
|
for (int j=0;j<numDevices;j++)
|
||||||
@@ -146,6 +148,7 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
clReleaseContext(context);
|
clReleaseContext(context);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
///Easier method to initialize OpenCL using createContextFromType for a GPU
|
///Easier method to initialize OpenCL using createContextFromType for a GPU
|
||||||
deviceType = CL_DEVICE_TYPE_GPU;
|
deviceType = CL_DEVICE_TYPE_GPU;
|
||||||
|
|||||||
Reference in New Issue
Block a user