MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / readFrom

Method readFrom

Src/Base/AMReX_FArrayBox.cpp:624–641  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

622}
623
624void
625FArrayBox::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
644int

Callers

nothing calls this directly

Calls 12

The_Pinned_ArenaFunction · 0.85
htod_memcpy_asyncFunction · 0.85
streamSynchronizeFunction · 0.85
skipMethod · 0.80
isManagedMethod · 0.45
arenaMethod · 0.45
isDeviceMethod · 0.45
boxMethod · 0.45
nCompMethod · 0.45
readMethod · 0.45
dataPtrMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected