MCPcopy Create free account
hub / github.com/clMathLibraries/clFFT / checkDevExt

Function checkDevExt

src/library/plan.cpp:181–198  ·  view source on GitHub ↗

Returns CLFFT_SUCCESS if the fp64 is present, CLFFT_DEVICE_NO_DOUBLE if it is not found.

Source from the content-addressed store, hash-verified

179
180// Returns CLFFT_SUCCESS if the fp64 is present, CLFFT_DEVICE_NO_DOUBLE if it is not found.
181clfftStatus checkDevExt( std::string ext, const cl_device_id &device )
182{
183 size_t deviceExtSize = 0;
184 OPENCL_V( ::clGetDeviceInfo( device, CL_DEVICE_EXTENSIONS, 0, NULL, &deviceExtSize ),
185 "Getting CL_DEVICE_EXTENSIONS Platform Info string size ( ::clGetDeviceInfo() )" );
186
187 std::vector< char > szDeviceExt( deviceExtSize );
188 OPENCL_V( ::clGetDeviceInfo( device, CL_DEVICE_EXTENSIONS, deviceExtSize, &szDeviceExt[ 0 ], NULL ),
189 "Getting CL_DEVICE_EXTENSIONS Platform Info string ( ::clGetDeviceInfo() )" );
190
191 std::string strDeviceExt = &szDeviceExt[ 0 ];
192
193 if( strDeviceExt.find( ext.c_str( ), 0 ) == std::string::npos )
194 return CLFFT_DEVICE_NO_DOUBLE;
195
196
197 return CLFFT_SUCCESS;
198}
199
200clfftStatus clfftCreateDefaultPlanInternal( clfftPlanHandle* plHandle, cl_context context, const clfftDim dim,
201 const size_t* clLengths )

Callers 1

clfftBakePlanFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected