Skip to content

Commit 849fc16

Browse files
Bhaskar VishnuVardhan ChebroluGitHub Enterprise
authored andcommitted
updated the xcl2 under includes
2 parents 2b2a2b0 + 022fb83 commit 849fc16

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

common/includes/xcl2/xcl2.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)