diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2021-10-05 20:49:26 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2021-10-05 23:09:56 +0200 |
commit | 10ad9560fba562f494fa44fc8a7bd2388d9e8c5c (patch) | |
tree | 734c31a455749a7c30556a05b62bcf21cf9ad7df /opencl | |
parent | 1f90b8086fcad7ac033e76a96bf102db7c15e44f (diff) |
drop 'using namespace std' in o* r* x*
Change-Id: I15d56d133cf464a3cb6483be785b1259c7f35b43
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123120
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'opencl')
-rw-r--r-- | opencl/opencltest/main.cxx | 10 | ||||
-rw-r--r-- | opencl/source/openclwrapper.cxx | 2 |
2 files changed, 4 insertions, 8 deletions
diff --git a/opencl/opencltest/main.cxx b/opencl/opencltest/main.cxx index a499032f8c05..0db18b0042d1 100644 --- a/opencl/opencltest/main.cxx +++ b/opencl/opencltest/main.cxx @@ -18,8 +18,6 @@ #include <clew_setup.hxx> -using namespace std; - // The purpose of this separate executable is to check whether OpenCL works // without crashing (asserting, etc.). Other checks can be done by LO core itself. @@ -44,7 +42,7 @@ static void runTest(const char* deviceName, const char* devicePlatform) // Find the given OpenCL device (in order to use the same one as LO core). cl_uint numPlatforms; openclcheck(clGetPlatformIDs(0, nullptr, &numPlatforms)); - vector<cl_platform_id> platforms(numPlatforms); + std::vector<cl_platform_id> platforms(numPlatforms); openclcheck(clGetPlatformIDs(numPlatforms, platforms.data(), nullptr)); cl_platform_id platformId = nullptr; for (cl_uint i = 0; i < numPlatforms; ++i) @@ -67,7 +65,7 @@ static void runTest(const char* deviceName, const char* devicePlatform) cl_uint numDevices; openclcheck(clGetDeviceIDs(platformId, CL_DEVICE_TYPE_ALL, 0, nullptr, &numDevices)); - vector<cl_device_id> devices(numDevices); + std::vector<cl_device_id> devices(numDevices); openclcheck( clGetDeviceIDs(platformId, CL_DEVICE_TYPE_ALL, numDevices, devices.data(), nullptr)); cl_device_id deviceId = nullptr; @@ -116,11 +114,11 @@ static void runTest(const char* deviceName, const char* devicePlatform) size_t length; status = clGetProgramBuildInfo(program, deviceId, CL_PROGRAM_BUILD_LOG, 0, nullptr, &length); - vector<char> error(length + 1); + std::vector<char> error(length + 1); status = clGetProgramBuildInfo(program, deviceId, CL_PROGRAM_BUILD_LOG, length, error.data(), nullptr); error[length] = '\0'; - cerr << "OpenCL driver check build error:" << error.data() << endl; + std::cerr << "OpenCL driver check build error:" << error.data() << std::endl; abort(); } #endif diff --git a/opencl/source/openclwrapper.cxx b/opencl/source/openclwrapper.cxx index 6f4de39bfae7..f6d1242baa3d 100644 --- a/opencl/source/openclwrapper.cxx +++ b/opencl/source/openclwrapper.cxx @@ -56,8 +56,6 @@ if( status != CL_SUCCESS ) \ return false; \ } -using namespace std; - namespace { bool bIsInited = false; |