2 #ifndef BL_FABFACTORY_H_
3 #define BL_FABFACTORY_H_
4 #include <AMReX_Config.H>
65 if constexpr (IsBaseFab_v<FAB>) {
66 return box.
numPts() * ncomps * Long(
sizeof(
typename FAB::value_type));
#define AMREX_NODISCARD
Definition: AMReX_Extension.H:251
A virtual base class for objects that manage their own dynamic memory allocation.
Definition: AMReX_Arena.H:100
AMREX_GPU_HOST_DEVICE Long numPts() const noexcept
Returns the number of points contained in the BoxND.
Definition: AMReX_Box.H:346
Definition: AMReX_FabFactory.H:76
void destroy(FAB *fab) const override
Definition: AMReX_FabFactory.H:90
AMREX_NODISCARD DefaultFabFactory< FAB > * clone() const override
Definition: AMReX_FabFactory.H:96
AMREX_NODISCARD FAB * create_alias(FAB const &rhs, int scomp, int ncomp) const override
Definition: AMReX_FabFactory.H:85
AMREX_NODISCARD FAB * create(const Box &box, int ncomps, const FabInfo &info, int) const override
Definition: AMReX_FabFactory.H:79
Definition: AMReX_FabFactory.H:50
virtual AMREX_NODISCARD FAB * create_alias(FAB const &, int, int) const
Definition: AMReX_FabFactory.H:61
virtual AMREX_NODISCARD FAB * create(const Box &box, int ncomps, const FabInfo &info, int box_index) const =0
virtual AMREX_NODISCARD FabFactory< FAB > * clone() const =0
virtual AMREX_NODISCARD Long nBytes(const Box &box, int ncomps, int) const
Definition: AMReX_FabFactory.H:64
virtual void destroy(FAB *fab) const =0
FabFactory() noexcept=default
@ FAB
Definition: AMReX_AmrvisConstants.H:86
Definition: AMReX_Amr.cpp:49
@ make_alias
Definition: AMReX_MakeType.H:7
FabType
Definition: AMReX_FabFactory.H:18
const int[]
Definition: AMReX_BLProfiler.cpp:1664
Definition: AMReX_FabFactory.H:27
FabInfo & SetArena(Arena *ar) noexcept
Definition: AMReX_FabFactory.H:42
bool alloc
Definition: AMReX_FabFactory.H:28
FabInfo & SetShared(bool s) noexcept
Definition: AMReX_FabFactory.H:37
bool shared
Definition: AMReX_FabFactory.H:29
FabInfo & SetAlloc(bool a) noexcept
Definition: AMReX_FabFactory.H:32
Arena * arena
Definition: AMReX_FabFactory.H:30