| 424 | } |
| 425 | |
| 426 | void |
| 427 | BlasBase::printEnvInfo(void) |
| 428 | { |
| 429 | cl_ulong memSize; |
| 430 | int i; |
| 431 | |
| 432 | if (primaryDevice_ == NULL) { |
| 433 | return; |
| 434 | } |
| 435 | |
| 436 | cl_uint libMajor, libMinor, libPatch; |
| 437 | clblasGetVersion( &libMajor, &libMinor, &libPatch ); |
| 438 | |
| 439 | std::cout << std::endl << "Test environment:" << std::endl << std::endl; |
| 440 | |
| 441 | for (i = 0; i < 2; i++) { |
| 442 | if (additionalDevice_ != NULL) { |
| 443 | if (!i) { |
| 444 | std::cout << "PRIMARY DEVICE (used in all cases):" << std::endl; |
| 445 | } |
| 446 | else { |
| 447 | std::cout << "ADDITIONAL DEVICE (used only in cases with " |
| 448 | "multiple command queues to cover cases with " |
| 449 | "problem distribution among command queues " |
| 450 | "belonging to different devices):" << std::endl; |
| 451 | } |
| 452 | } |
| 453 | else if (i) { |
| 454 | break; |
| 455 | } |
| 456 | |
| 457 | printDevInfoStr(CL_DEVICE_NAME, "Device name", i); |
| 458 | printDevInfoStr(CL_DEVICE_VENDOR, "Device vendor", i); |
| 459 | std::cout << "Platform (bit): "; |
| 460 | #if defined( _WIN32 ) |
| 461 | std::cout << "Windows "; |
| 462 | #if defined( _WIN64 ) |
| 463 | std::cout << "(x64)" << std::endl; |
| 464 | #else |
| 465 | std::cout << "(x32)" << std::endl; |
| 466 | #endif |
| 467 | #elif defined( __APPLE__ ) |
| 468 | std::cout << "Apple OS X" << std::endl; |
| 469 | #else |
| 470 | std::cout << "Linux" << std::endl; |
| 471 | #endif |
| 472 | std::cout << "clblas version: " << libMajor << "." << libMinor << "." |
| 473 | << libPatch << std::endl; |
| 474 | printDevInfoStr(CL_DRIVER_VERSION, "Driver version", i); |
| 475 | printDevInfoStr(CL_DEVICE_VERSION, "Device version", i); |
| 476 | memSize = availGlobalMemSize(i); |
| 477 | std::cout << "Global mem size: " << memSize / (1024 * 1024) << |
| 478 | " MB" << std::endl; |
| 479 | |
| 480 | std::cout << "---------------------------------------------------------" |
| 481 | << std::endl << std::endl; |
| 482 | } |
| 483 | } |
no test coverage detected