35 std::cerr <<
"Usage: opencl_infos [option]" << std::endl
37 <<
"Options:" << std::endl
38 <<
" --first-gpu only the first GPU device found" << std::endl;
49 main(
int argc,
const char*
const argv[]) {
51 for (
unsigned int i = 1; i < static_cast<unsigned int>(argc); ++i) {
52 const std::string param(argv[i]);
54 if (param ==
"--first-gpu") {
57 std::cout <<
"OpenCL first GPU device found:" << std::endl;
67 std::cout <<
"OpenCL platforms and devices:" << std::endl;
cl::Device get_first_device_gpu()
Return the first GPU device found. If not found then print an error message and exit.
void print_device(const cl::Device &device)
Print information on this device.
int main(int argc, const char *const argv[])
void print_platforms()
Print information on all platforms.
Implementation of the OpenCL parallel algorithms presented in the report.