File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -34,14 +34,21 @@ std::vector<cl::Device> get_devices(const std::string &vendor_name) {
3434 platform = platforms[i];
3535 OCL_CHECK (err, std::string platformName =
3636 platform.getInfo <CL_PLATFORM_NAME>(&err));
37- if (platformName == vendor_name) {
37+ if (!( platformName. compare ( vendor_name)) ) {
3838 std::cout << " Found Platform" << std::endl;
3939 std::cout << " Platform Name: " << platformName.c_str () << std::endl;
4040 break ;
4141 }
4242 }
4343 if (i == platforms.size ()) {
4444 std::cout << " Error: Failed to find Xilinx platform" << std::endl;
45+ std::cout << " Found the following platforms : " << std::endl;
46+ for (size_t j = 0 ; j < platforms.size (); j++) {
47+ platform = platforms[j];
48+ OCL_CHECK (err, std::string platformName =
49+ platform.getInfo <CL_PLATFORM_NAME>(&err));
50+ std::cout << " Platform Name: " << platformName.c_str () << std::endl;
51+ }
4552 exit (EXIT_FAILURE);
4653 }
4754 // Getting ACCELERATOR Devices and selecting 1st such device
You can’t perform that action at this time.
0 commit comments