Skip to content

Commit 50f6d54

Browse files
author
kallaballa
committed
renaming
1 parent 63b5dee commit 50f6d54

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

modules/core/src/opengl.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1641,28 +1641,28 @@ Context& initializeContextFromGL()
16411641
#elif !defined(HAVE_OPENCL_OPENGL_SHARING)
16421642
NO_OPENCL_SHARING_ERROR;
16431643
#else
1644-
cl_uint numPlatforms;
1644+
cl_uint platformsCnt;
16451645
cl_uint devCnt;
16461646
cl_device_id* devices;
16471647
cl_uint devUsed;
16481648
cl_context context;
16491649

1650-
cl_int status = clGetPlatformIDs(0, NULL, &numPlatforms);
1650+
cl_int status = clGetPlatformIDs(0, NULL, &platformsCnt);
16511651
if (status != CL_SUCCESS)
16521652
CV_Error_(cv::Error::OpenCLInitError, ("OpenCL: Can't get number of platforms: %d", status));
1653-
if (numPlatforms == 0)
1653+
if (platformsCnt == 0)
16541654
CV_Error(cv::Error::OpenCLInitError, "OpenCL: No available platforms");
16551655

1656-
std::vector<cl_platform_id> platforms(numPlatforms);
1657-
status = clGetPlatformIDs(numPlatforms, &platforms[0], NULL);
1656+
std::vector<cl_platform_id> platforms(platformsCnt);
1657+
status = clGetPlatformIDs(platformsCnt, &platforms[0], NULL);
16581658
if (status != CL_SUCCESS)
16591659
CV_Error_(cv::Error::OpenCLInitError, ("OpenCL: Can't get platforms: %d", status));
16601660

16611661

16621662
// TODO Filter platforms by name from OPENCV_OPENCL_DEVICE
16631663
bool sharingSupported = false;
16641664

1665-
for (unsigned int i = 0; (!sharingSupported && (i < numPlatforms)); ++i) {
1665+
for (unsigned int i = 0; (!sharingSupported && (i < platformsCnt)); ++i) {
16661666
status = clGetDeviceIDs(platforms[i], CL_DEVICE_TYPE_GPU, 0, NULL, &devCnt);
16671667
if (status != CL_SUCCESS)
16681668
CV_Error_(cv::Error::OpenCLInitError, ("OpenCL: No devices available: %d", status));

0 commit comments

Comments
 (0)