| 663 | } |
| 664 | |
| 665 | void |
| 666 | Arena::PrintUsageToStream (std::ostream& os, std::string const& space) |
| 667 | { |
| 668 | #ifdef AMREX_USE_GPU |
| 669 | Long megabytes = Gpu::Device::totalGlobalMem() / (1024*1024); |
| 670 | os << space << "Total GPU global memory (MB): " << megabytes << "\n"; |
| 671 | |
| 672 | megabytes = Gpu::Device::freeMemAvailable() / (1024*1024); |
| 673 | os << space << "Free GPU global memory (MB): " << megabytes << "\n"; |
| 674 | #endif |
| 675 | |
| 676 | if (The_Arena()) { |
| 677 | auto* p = dynamic_cast<CArena*>(The_Arena()); |
| 678 | if (p) { |
| 679 | p->PrintUsage(os, "The Arena", space); |
| 680 | } |
| 681 | } |
| 682 | if (The_Device_Arena() && The_Device_Arena() != The_Arena()) { |
| 683 | auto* p = dynamic_cast<CArena*>(The_Device_Arena()); |
| 684 | if (p) { |
| 685 | p->PrintUsage(os, "The Device Arena", space); |
| 686 | } |
| 687 | } |
| 688 | if (The_Managed_Arena() && The_Managed_Arena() != The_Arena()) { |
| 689 | auto* p = dynamic_cast<CArena*>(The_Managed_Arena()); |
| 690 | if (p) { |
| 691 | p->PrintUsage(os, "The Managed Arena", space); |
| 692 | } |
| 693 | } |
| 694 | if (The_Pinned_Arena()) { |
| 695 | auto* p = dynamic_cast<CArena*>(The_Pinned_Arena()); |
| 696 | if (p) { |
| 697 | p->PrintUsage(os, "The Pinned Arena", space); |
| 698 | } |
| 699 | } |
| 700 | if (The_Comms_Arena() && The_Comms_Arena() != The_Device_Arena() |
| 701 | && The_Comms_Arena() != The_Pinned_Arena()) { |
| 702 | auto* p = dynamic_cast<CArena*>(The_Comms_Arena()); |
| 703 | if (p) { |
| 704 | p->PrintUsage(os, "The Comms Arena", space); |
| 705 | } |
| 706 | } |
| 707 | } |
| 708 | |
| 709 | void |
| 710 | Arena::PrintUsageToFiles (const std::string& filename, const std::string& message) |
nothing calls this directly
no test coverage detected