cl_device_id device_id; err = clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, 1, &device_id, NULL); if(err != CL_SUCCESS){ std::cerr << Error: Failed to create a device group! << std::endl; return EXIT_FAILURE; } cl_context context; context = clCreateContext(0, 1, &device_id, NULL, NULL, &err); if (!context) { std::cerr << Error: Failed to create a compute context! << std::endl; return EXIT_FAILURE; } cl_command_queue commands; commands = clCreateCommandQueue(context, device_id, 0, &err); if (!commands) { std::cerr << Error: Failed to create a command commands! << std::endl; return EXIT_FAILURE; } //...