From d1a510c9bde5eb9ca8ec1aa3e81782b0615fc95b Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 12 Jan 2018 20:19:00 +0100 Subject: More loplugin:cstylecast: opencl auto-rewrite with "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: Id28f5699a4a9c0078a1326e81e833b75951f97cc --- opencl/inc/opencl_device_selection.h | 4 ++-- opencl/source/opencl_device.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'opencl') diff --git a/opencl/inc/opencl_device_selection.h b/opencl/inc/opencl_device_selection.h index 5ebc87a9410c..8849cd59abbc 100644 --- a/opencl/inc/opencl_device_selection.h +++ b/opencl/inc/opencl_device_selection.h @@ -158,7 +158,7 @@ inline ds_status initDSProfile(std::unique_ptr& rProfile, OString co } numDevices = 0; - for (i = 0; i < (unsigned int)numPlatforms; i++) + for (i = 0; i < static_cast(numPlatforms); i++) { cl_uint num = 0; cl_int err = clGetDeviceIDs(platforms[i], CL_DEVICE_TYPE_ALL, 0, nullptr, &num); @@ -182,7 +182,7 @@ inline ds_status initDSProfile(std::unique_ptr& rProfile, OString co rProfile->devices.resize(numDevices + 1); // +1 to numDevices to include the native CPU next = 0; - for (i = 0; i < (unsigned int)numPlatforms; i++) + for (i = 0; i < static_cast(numPlatforms); i++) { cl_uint num = 0; unsigned j; diff --git a/opencl/source/opencl_device.cxx b/opencl/source/opencl_device.cxx index 57c56ca3cf58..f803076c97b4 100644 --- a/opencl/source/opencl_device.cxx +++ b/opencl/source/opencl_device.cxx @@ -302,7 +302,7 @@ ds_status evaluateScoreForDevice(ds_device& rDevice, std::unique_ptroutputSize); + rDevice.fTime /= (static_cast(j) / testData->outputSize); // InterpretTail - the S/W fallback is nothing like as efficient // as any good openCL implementation: no SIMD, tons of branching -- cgit