// assume that sizeof(char) is one byte.
std::array<char, 1024> deviceName;
size_t deviceNameLength;
- cl_int cl_error = clGetDeviceInfo(deviceId, CL_DEVICE_NAME, deviceName.size(),
- deviceName.data(), &deviceNameLength);
+ cl_int cl_error = clGetDeviceInfo(
+ deviceId, CL_DEVICE_NAME, deviceName.size(), deviceName.data(), &deviceNameLength);
if (cl_error != CL_SUCCESS)
{
GMX_THROW(InternalError(formatString("Could not get OpenCL device name, error was %s",
(symbols), by permitting only alphanumeric characters from the
current locale. We assume these work well enough in a
filename. */
- std::copy_if(deviceName.begin(), deviceName.begin() + deviceNameLength,
- std::back_inserter(cacheFilename), isalnum);
+ std::copy_if(deviceName.begin(),
+ deviceName.begin() + deviceNameLength,
+ std::back_inserter(cacheFilename),
+ isalnum);
cacheFilename += ".bin";
return cacheFilename;
/* Create program from pre-built binary */
cl_int cl_error;
- cl_program program = clCreateProgramWithBinary(context, 1, &deviceId, &fileSize,
- const_cast<const unsigned char**>(&binary),
- nullptr, &cl_error);
+ cl_program program = clCreateProgramWithBinary(
+ context, 1, &deviceId, &fileSize, const_cast<const unsigned char**>(&binary), nullptr, &cl_error);
if (cl_error != CL_SUCCESS)
{
GMX_THROW(InternalError("Could not create OpenCL program from the cache file " + filename