| 622 | } |
| 623 | |
| 624 | void |
| 625 | FArrayBox::readFrom (std::istream& is) |
| 626 | { |
| 627 | // BL_PROFILE("FArrayBox::readFrom_is"); |
| 628 | FABio* fabrd = FABio::read_header(is, *this); |
| 629 | #ifdef AMREX_USE_GPU |
| 630 | if (this->arena()->isManaged() || this->arena()->isDevice()) { |
| 631 | FArrayBox hostfab(this->box(), this->nComp(), The_Pinned_Arena()); |
| 632 | fabrd->read(is, hostfab); |
| 633 | Gpu::htod_memcpy_async(this->dataPtr(), hostfab.dataPtr(), hostfab.size()*sizeof(Real)); |
| 634 | Gpu::streamSynchronize(); |
| 635 | } else |
| 636 | #endif |
| 637 | { |
| 638 | fabrd->read(is, *this); |
| 639 | } |
| 640 | delete fabrd; |
| 641 | } |
| 642 | |
| 643 | |
| 644 | int |
nothing calls this directly
no test coverage detected