| 319 | |
| 320 | |
| 321 | void print_device_bdf(const std::vector<cl::Device>& devices) { |
| 322 | char device_bdf[20]; |
| 323 | cl_int err; |
| 324 | cl::Device device; |
| 325 | for (uint32_t i = 0; i < devices.size(); i++) { |
| 326 | OCL_CHECK(err, err = devices[i].getInfo(CL_DEVICE_PCIE_BDF, &device_bdf)); |
| 327 | std::cout << device_bdf << std::endl; |
| 328 | } |
| 329 | } |
| 330 | |
| 331 | int main(int argc, char* argv[]) { |
| 332 |