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

Function BaseFab_Initialize

Src/Base/AMReX_BaseFab.cpp:29–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29void
30BaseFab_Initialize ()
31{
32 if (!basefab_initialized)
33 {
34 basefab_initialized = true;
35
36#ifdef AMREX_USE_OMP
37#pragma omp parallel
38 {
39 amrex::private_total_bytes_allocated_in_fabs = 0;
40 amrex::private_total_bytes_allocated_in_fabs_hwm = 0;
41 amrex::private_total_cells_allocated_in_fabs = 0;
42 amrex::private_total_cells_allocated_in_fabs_hwm = 0;
43 }
44#endif
45
46#ifdef AMREX_MEM_PROFILING
47 MemProfiler::add("Fab", std::function<MemProfiler::MemInfo()>
48 ([] () -> MemProfiler::MemInfo {
49 return {amrex::TotalBytesAllocatedInFabs(),
50 amrex::TotalBytesAllocatedInFabsHWM()};
51 }));
52#endif
53 }
54
55 amrex::ExecOnFinalize(amrex::BaseFab_Finalize);
56}
57
58void
59BaseFab_Finalize()

Callers 1

InitializeMethod · 0.85

Calls 2

Tested by

no test coverage detected