Code quality: More MSVC warning fixing
This commit is contained in:
@@ -176,7 +176,7 @@ bool Device::fp64_support() const
|
|||||||
switch(backend_)
|
switch(backend_)
|
||||||
{
|
{
|
||||||
case OPENCL:
|
case OPENCL:
|
||||||
return ocl::info<CL_DEVICE_DOUBLE_FP_CONFIG>(h_.cl());
|
return extensions().find("cl_khr_fp64")!=std::string::npos;
|
||||||
|
|
||||||
#ifdef ISAAC_WITH_CUDA
|
#ifdef ISAAC_WITH_CUDA
|
||||||
case CUDA:
|
case CUDA:
|
||||||
@@ -201,7 +201,7 @@ bool Device::fp64_support() const
|
|||||||
switch(backend_)\
|
switch(backend_)\
|
||||||
{\
|
{\
|
||||||
CUDACASE(CUNAME)\
|
CUDACASE(CUNAME)\
|
||||||
case OPENCL: return ocl::info<CLNAME>(h_.cl());\
|
case OPENCL: return static_cast<ret>(ocl::info<CLNAME>(h_.cl()));\
|
||||||
default: throw;\
|
default: throw;\
|
||||||
}\
|
}\
|
||||||
}\
|
}\
|
||||||
|
@@ -38,7 +38,7 @@ long Event::elapsed_time() const
|
|||||||
return 1e6*time;
|
return 1e6*time;
|
||||||
#endif
|
#endif
|
||||||
case OPENCL:
|
case OPENCL:
|
||||||
return ocl::info<CL_PROFILING_COMMAND_END>(h_.cl()) - ocl::info<CL_PROFILING_COMMAND_START>(h_.cl());
|
return static_cast<long>(ocl::info<CL_PROFILING_COMMAND_END>(h_.cl()) - ocl::info<CL_PROFILING_COMMAND_START>(h_.cl()));
|
||||||
default:
|
default:
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
@@ -129,7 +129,7 @@ Program::Program(Context const & context, std::string const & source) : backend_
|
|||||||
h_.cl() = clCreateProgramWithSource(context_.h_.cl(), 1, &csrc, &srclen, &err);
|
h_.cl() = clCreateProgramWithSource(context_.h_.cl(), 1, &csrc, &srclen, &err);
|
||||||
try{
|
try{
|
||||||
ocl::check(clBuildProgram(h_.cl(), devices.size(), devices.data(), build_opt.c_str(), NULL, NULL));
|
ocl::check(clBuildProgram(h_.cl(), devices.size(), devices.data(), build_opt.c_str(), NULL, NULL));
|
||||||
}catch(ocl::exception::build_program_failure const & e){
|
}catch(ocl::exception::build_program_failure const &){
|
||||||
for(std::vector<cl_device_id>::const_iterator it = devices.begin(); it != devices.end(); ++it)
|
for(std::vector<cl_device_id>::const_iterator it = devices.begin(); it != devices.end(); ++it)
|
||||||
{
|
{
|
||||||
std::cout << "Device : " << ocl::info<CL_DEVICE_NAME>(*it)
|
std::cout << "Device : " << ocl::info<CL_DEVICE_NAME>(*it)
|
||||||
|
Reference in New Issue
Block a user