summaryrefslogtreecommitdiff
path: root/opencl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-08 16:26:52 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-08 16:26:52 +0200
commita3cebe2e4e5b9883c3842fadea0085bd27a05a4c (patch)
tree09ba7536dda321789af5ac54b74538ccbb305ed4 /opencl
parent17a5b0f6ed885f1e638b5265f13f96a9c234efcf (diff)
loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I1c8cf28803694f81985b9d1c61c62d28158a2f71
Diffstat (limited to 'opencl')
-rw-r--r--opencl/source/opencl_device.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/opencl/source/opencl_device.cxx b/opencl/source/opencl_device.cxx
index fcceb00ebdbb..646bbb93cfb1 100644
--- a/opencl/source/opencl_device.cxx
+++ b/opencl/source/opencl_device.cxx
@@ -200,7 +200,7 @@ void populateInput(LibreOfficeDeviceEvaluationIO* testData)
ds_status serializeScore(ds_device* device, void** serializedScore, unsigned int* serializedScoreSize)
{
*serializedScoreSize = sizeof(LibreOfficeDeviceScore);
- *serializedScore = (void*)new unsigned char[*serializedScoreSize];
+ *serializedScore = static_cast<void*>(new unsigned char[*serializedScoreSize]);
memcpy(*serializedScore, device->score, *serializedScoreSize);
return DS_SUCCESS;
}
@@ -269,7 +269,7 @@ ds_status evaluateScoreForDevice(ds_device* device, void* evalData)
if (!bKhrFp64Flag && !bAmdFp64Flag)
{
/* No 64-bit float support */
- device->score = (void*)new LibreOfficeDeviceScore;
+ device->score = static_cast<void*>(new LibreOfficeDeviceScore);
static_cast<LibreOfficeDeviceScore*>(device->score)->fTime = DBL_MAX;
static_cast<LibreOfficeDeviceScore*>(device->score)->bNoCLErrors = true;
SAL_INFO("opencl.device", "... no fp64 support");
@@ -300,7 +300,7 @@ ds_status evaluateScoreForDevice(ds_device* device, void* evalData)
SAL_INFO("opencl.device", "Build Errors:\n" << buildLog);
free(buildLog);
- device->score = (void*)new LibreOfficeDeviceScore;
+ device->score = static_cast<void*>(new LibreOfficeDeviceScore);
static_cast<LibreOfficeDeviceScore*>(device->score)->fTime = DBL_MAX;
static_cast<LibreOfficeDeviceScore*>(device->score)->bNoCLErrors = false;
}
@@ -324,15 +324,15 @@ ds_status evaluateScoreForDevice(ds_device* device, void* evalData)
DS_CHECK_STATUS(clStatus, "evaluateScoreForDevice::clCreateBuffer::clInput2");
cl_mem clInput3 = clCreateBuffer(clContext, CL_MEM_READ_ONLY | CL_MEM_USE_HOST_PTR, sizeof(cl_double) * testData->inputSize, &testData->input3[0], &clStatus);
DS_CHECK_STATUS(clStatus, "evaluateScoreForDevice::clCreateBuffer::clInput3");
- clStatus = clSetKernelArg(clKernel, 0, sizeof(cl_mem), (void*)&clResult);
+ clStatus = clSetKernelArg(clKernel, 0, sizeof(cl_mem), static_cast<void*>(&clResult));
DS_CHECK_STATUS(clStatus, "evaluateScoreForDevice::clSetKernelArg::clResult");
- clStatus = clSetKernelArg(clKernel, 1, sizeof(cl_mem), (void*)&clInput0);
+ clStatus = clSetKernelArg(clKernel, 1, sizeof(cl_mem), static_cast<void*>(&clInput0));
DS_CHECK_STATUS(clStatus, "evaluateScoreForDevice::clSetKernelArg::clInput0");
- clStatus = clSetKernelArg(clKernel, 2, sizeof(cl_mem), (void*)&clInput1);
+ clStatus = clSetKernelArg(clKernel, 2, sizeof(cl_mem), static_cast<void*>(&clInput1));
DS_CHECK_STATUS(clStatus, "evaluateScoreForDevice::clSetKernelArg::clInput1");
- clStatus = clSetKernelArg(clKernel, 3, sizeof(cl_mem), (void*)&clInput2);
+ clStatus = clSetKernelArg(clKernel, 3, sizeof(cl_mem), static_cast<void*>(&clInput2));
DS_CHECK_STATUS(clStatus, "evaluateScoreForDevice::clSetKernelArg::clInput2");
- clStatus = clSetKernelArg(clKernel, 4, sizeof(cl_mem), (void*)&clInput3);
+ clStatus = clSetKernelArg(clKernel, 4, sizeof(cl_mem), static_cast<void*>(&clInput3));
DS_CHECK_STATUS(clStatus, "evaluateScoreForDevice::clSetKernelArg::clInput3");
size_t globalWS[1] = { testData->outputSize };
size_t localSize[1] = { 64 };
@@ -346,7 +346,7 @@ ds_status evaluateScoreForDevice(ds_device* device, void* evalData)
clReleaseMemObject(clResult);
clReleaseKernel(clKernel);
- device->score = (void*)new LibreOfficeDeviceScore;
+ device->score = static_cast<void*>(new LibreOfficeDeviceScore);
static_cast<LibreOfficeDeviceScore*>(device->score)->fTime = timerCurrent(&kernelTime);
static_cast<LibreOfficeDeviceScore*>(device->score)->bNoCLErrors = true;
}
@@ -385,7 +385,7 @@ ds_status evaluateScoreForDevice(ds_device* device, void* evalData)
// slower than the above.
float fInterpretTailFactor = 10.0;
- device->score = (void*)new LibreOfficeDeviceScore;
+ device->score = static_cast<void*>(new LibreOfficeDeviceScore);
static_cast<LibreOfficeDeviceScore*>(device->score)->fTime = timerCurrent(&kernelTime);
static_cast<LibreOfficeDeviceScore*>(device->score)->bNoCLErrors = true;
@@ -529,7 +529,7 @@ ds_device getDeviceSelection(const char* sProfilePath, bool bForceSelection)
/* Perform evaluations */
unsigned int numUpdates;
- status = profileDevices(profile, DS_EVALUATE_ALL, evaluateScoreForDevice, (void*)testData.get(), &numUpdates);
+ status = profileDevices(profile, DS_EVALUATE_ALL, evaluateScoreForDevice, static_cast<void*>(testData.get()), &numUpdates);
if (DS_SUCCESS == status)
{