Nektar++
Classes | Static Public Member Functions | List of all members
Nektar::MemoryManager< DataType > Class Template Reference

General purpose memory allocation routines with the ability to allocate from thread specific memory pools. More...

#include <NekMemoryManager.hpp>

Classes

struct  rebind
 

Static Public Member Functions

static void Deallocate (DataType *&data)
 Deallocate a pointer allocated by MemoryManager::Allocate. More...
 
template<typename... Args>
static DataType * Allocate (const Args &...args)
 Allocates a single object from the memory pool. More...
 
template<typename... Args>
static std::shared_ptr< DataType > AllocateSharedPtr (const Args &...args)
 Allocate a shared pointer from the memory pool. More...
 
template<typename DeallocatorType , typename... Args>
static std::shared_ptr< DataType > AllocateSharedPtrD (const DeallocatorType &d, const Args &...args)
 
static DataType * RawAllocate (size_t NumberOfElements)
 Allocates a chunk of raw, uninitialized memory, capable of holding NumberOfElements objects. More...
 
static void RawDeallocate (DataType *array, size_t NumberOfElements)
 Deallocates memory allocated from RawAllocate. More...
 

Allocator Interface

The allocator interface allows a MemoryManager object to be used in any object that allows an allocator parameter, such as STL containers.

typedef DataType value_type
 
typedef size_t size_type
 
typedef ptrdiff_t difference_type
 
typedef DataType * pointer
 
typedef const DataType * const_pointer
 
typedef DataType & reference
 
typedef const DataType & const_reference
 
 MemoryManager ()
 
template<typename T >
 MemoryManager (const MemoryManager< T > &rhs)
 
 ~MemoryManager ()
 
pointer address (reference r) const
 
const_pointer address (const_reference r) const
 
pointer allocate (size_type n, std::allocator< void >::const_pointer hint=0)
 
void deallocate (pointer p, size_type n)
 
void construct (pointer p, const_reference val)
 
void destroy (pointer p)
 
size_type max_size ()
 

Detailed Description

template<typename DataType>
class Nektar::MemoryManager< DataType >

General purpose memory allocation routines with the ability to allocate from thread specific memory pools.

If compiled with NEKTAR_MEMORY_POOL_ENABLED, the MemoryManager allocates from thread specific memory pools for small objects. Large objects are managed with the system supplied new/delete. These memory pools provide faster allocation and deallocation of small objects (particularly useful for shared pointers which allocate many 4 byte objects).

Warning
All memory allocated from the memory manager must be returned to the memory manager. Calling delete on memory allocated from the manager will likely cause undefined behavior. A particularly subtle violation of this rule occurs when giving memory allocated from the manager to a shared pointer.
std::shared_ptr<Obj> f(MemoryManager<Obj>::Allocate());
Shared pointers call delete when they go out of scope, so this line of code will cause problems. Instead, you should call the AllocateSharedPtr method:
std::shared_ptr<Obj> f = MemoryManager<Obj>::AllocateSharedPtr();

Definition at line 83 of file NekMemoryManager.hpp.

Member Typedef Documentation

◆ const_pointer

template<typename DataType>
typedef const DataType* Nektar::MemoryManager< DataType >::const_pointer

Definition at line 223 of file NekMemoryManager.hpp.

◆ const_reference

template<typename DataType>
typedef const DataType& Nektar::MemoryManager< DataType >::const_reference

Definition at line 225 of file NekMemoryManager.hpp.

◆ difference_type

template<typename DataType>
typedef ptrdiff_t Nektar::MemoryManager< DataType >::difference_type

Definition at line 221 of file NekMemoryManager.hpp.

◆ pointer

template<typename DataType>
typedef DataType* Nektar::MemoryManager< DataType >::pointer

Definition at line 222 of file NekMemoryManager.hpp.

◆ reference

template<typename DataType>
typedef DataType& Nektar::MemoryManager< DataType >::reference

Definition at line 224 of file NekMemoryManager.hpp.

◆ size_type

template<typename DataType>
typedef size_t Nektar::MemoryManager< DataType >::size_type

Definition at line 220 of file NekMemoryManager.hpp.

◆ value_type

template<typename DataType>
typedef DataType Nektar::MemoryManager< DataType >::value_type

Definition at line 219 of file NekMemoryManager.hpp.

Constructor & Destructor Documentation

◆ MemoryManager() [1/2]

template<typename DataType>
Nektar::MemoryManager< DataType >::MemoryManager ( )
inline

Definition at line 227 of file NekMemoryManager.hpp.

227 {}

◆ MemoryManager() [2/2]

template<typename DataType>
template<typename T >
Nektar::MemoryManager< DataType >::MemoryManager ( const MemoryManager< T > &  rhs)
inline

Definition at line 229 of file NekMemoryManager.hpp.

230  {
231  boost::ignore_unused(rhs);
232  }
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs

◆ ~MemoryManager()

template<typename DataType>
Nektar::MemoryManager< DataType >::~MemoryManager ( )
inline

Definition at line 233 of file NekMemoryManager.hpp.

233 {}

Member Function Documentation

◆ address() [1/2]

template<typename DataType>
pointer Nektar::MemoryManager< DataType >::address ( reference  r) const
inline

Definition at line 235 of file NekMemoryManager.hpp.

235 { return &r; }

◆ address() [2/2]

template<typename DataType>
const_pointer Nektar::MemoryManager< DataType >::address ( const_reference  r) const
inline

Definition at line 236 of file NekMemoryManager.hpp.

236 { return &r; }

◆ Allocate()

template<typename DataType>
template<typename... Args>
static DataType* Nektar::MemoryManager< DataType >::Allocate ( const Args &...  args)
inlinestatic

Allocates a single object from the memory pool.

Exceptions
unknownAny exception thrown by DataType's default constructor will propogate through this method.

The allocated object must be returned to the memory pool via Deallocate.

Definition at line 149 of file NekMemoryManager.hpp.

Referenced by Nektar::MemoryManager< DataType >::AllocateSharedPtrD(), and Nektar::MemoryManager< DataType >::Deallocate().

150  {
151  return new DataType(args...);
152  }

◆ allocate()

template<typename DataType>
pointer Nektar::MemoryManager< DataType >::allocate ( size_type  n,
std::allocator< void >::const_pointer  hint = 0 
)
inline

Definition at line 238 of file NekMemoryManager.hpp.

References Nektar::MemoryManager< DataType >::RawAllocate().

239  {
240  boost::ignore_unused(hint);
241  return RawAllocate(n);
242  }
static DataType * RawAllocate(size_t NumberOfElements)
Allocates a chunk of raw, uninitialized memory, capable of holding NumberOfElements objects...

◆ AllocateSharedPtr()

template<typename DataType>
template<typename... Args>
static std::shared_ptr<DataType> Nektar::MemoryManager< DataType >::AllocateSharedPtr ( const Args &...  args)
inlinestatic

Allocate a shared pointer from the memory pool.

The shared pointer does not need to be returned to the memory pool. When the reference count to this object reaches 0, the shared pointer will automatically return the memory.

Definition at line 161 of file NekMemoryManager.hpp.

References Nektar::MemoryManager< DataType >::AllocateSharedPtrD().

Referenced by Nektar::FieldUtils::Field::AppendExpList(), Nektar::ArtificialDiffusion::ArtificialDiffusion(), Nektar::MultiRegions::GlobalLinSysDirectFull::AssembleFullMatrix(), Nektar::MultiRegions::AssemblyMap::AssemblyMap(), Nektar::MultiRegions::AssemblyMapCG::AssemblyMapCG(), Nektar::MultiRegions::AssemblyMapDG::AssemblyMapDG(), Nektar::MultiRegions::PreconditionerBlock::BlockPreconditionerCG(), Nektar::MultiRegions::PreconditionerBlock::BlockPreconditionerHDG(), Nektar::MultiRegions::BottomUpSubStructuredGraph::BottomUpSubStructuredGraph(), Nektar::Utilities::ProcessBL::BoundaryLayer2D(), Nektar::Utilities::ProcessBL::BoundaryLayer3D(), Nektar::LinearElasticSystem::BuildLaplacianIJMatrix(), Nektar::SolverUtils::ForcingAbsorption::CalcAbsorption(), Nektar::SolverUtils::FilterAeroForces::CalculateForcesMapping(), Nektar::LibUtilities::NodalTriElec::CalculatePoints(), Nektar::LibUtilities::NodalPrismElec::CalculatePoints(), Nektar::LibUtilities::NodalTetElec::CalculatePoints(), Nektar::LibUtilities::NodalTriEvenlySpaced::CalculatePoints(), Nektar::LibUtilities::NodalTriFekete::CalculatePoints(), Nektar::LibUtilities::NodalPrismEvenlySpaced::CalculatePoints(), Nektar::LibUtilities::NodalTetEvenlySpaced::CalculatePoints(), Nektar::CFSBndCond::CFSBndCond(), Nektar::NekMeshUtils::BPoint::ChangeType(), Nektar::MultiRegions::GlobalLinSysStaticCond::ConstructNextLevelCondensedSystem(), Nektar::MultiRegions::ContField1D::ContField1D(), Nektar::MultiRegions::ContField2D::ContField2D(), Nektar::MultiRegions::ContField3D::ContField3D(), Nektar::MultiRegions::ContField3DHomogeneous1D::ContField3DHomogeneous1D(), Nektar::MultiRegions::ContField3DHomogeneous2D::ContField3DHomogeneous2D(), Nektar::CoupledLocalToGlobalC0ContMap::CoupledLocalToGlobalC0ContMap(), Nektar::PanditGilesDemir03::create(), Nektar::Fox02::create(), Nektar::LuoRudy91::create(), Nektar::FentonKarma::create(), Nektar::CellModelAlievPanfilov::create(), Nektar::VelocityCorrectionScheme::create(), Nektar::VCSWeakPressure::create(), Nektar::Winslow99::create(), Nektar::CellModelFitzHughNagumo::create(), Nektar::CourtemancheRamirezNattel98::create(), Nektar::SteadyAdvectionDiffusionReaction::create(), Nektar::TenTusscher06::create(), Nektar::SolverUtils::FilterEnergy::create(), Nektar::NekMeshUtils::CADCurveCFI::create(), Nektar::VCSMapping::create(), Nektar::Poisson::create(), Nektar::Helmholtz::create(), Nektar::NekMeshUtils::VolumeMesh::create(), Nektar::Utilities::OutputSTL::create(), Nektar::NekMeshUtils::CADCurveOCE::create(), Nektar::NekMeshUtils::CADSurfCFI::create(), Nektar::NekMeshUtils::CADSurfOCE::create(), Nektar::Utilities::ProcessCyl::create(), Nektar::FieldUtils::ProcessDeform::create(), Nektar::FieldUtils::ProcessDisplacement::create(), Nektar::EulerCFE::create(), Nektar::NekMeshUtils::HOSurfaceMesh::create(), Nektar::NekMeshUtils::ProcessLoadCAD::create(), Nektar::NekMeshUtils::ProcessLoadOctree::create(), Nektar::Utilities::ProcessOptiExtract::create(), Nektar::Utilities::ProcessPerAlign::create(), Nektar::ProtocolS1S2::create(), Nektar::Utilities::InputTec::create(), Nektar::SteadyAdvectionDiffusion::create(), Nektar::SpatialDomains::MeshPartitionPtScotch::create(), Nektar::NoAdvection::create(), Nektar::SolverUtils::FilterCheckpoint::create(), Nektar::FilterCheckpointCellModel::create(), Nektar::FilterCellHistoryPoints::create(), Nektar::FilterElectrogram::create(), Nektar::FieldUtils::OutputInfo::create(), Nektar::UnsteadyInviscidBurger::create(), Nektar::Utilities::OutputNekpp::create(), Nektar::SolverUtils::FilterReynoldsStresses::create(), Nektar::FieldUtils::OutputStdOut::create(), Nektar::Utilities::OutputVtk::create(), Nektar::FieldUtils::OutputXml::create(), Nektar::AlternateSkewAdvection::create(), Nektar::NekMeshUtils::CADSystemCFI::create(), Nektar::FieldUtils::ProcessJacobianEnergy::create(), Nektar::NekMeshUtils::CADSystemOCE::create(), Nektar::NekMeshUtils::CADVertCFI::create(), Nektar::FieldUtils::ProcessQualityMetric::create(), Nektar::NekMeshUtils::CADVertOCE::create(), Nektar::Utilities::InputPly::create(), Nektar::ProtocolS1::create(), Nektar::ProtocolSingle::create(), Nektar::Utilities::InputSwan::create(), Nektar::Utilities::InputVtk::create(), Nektar::SpatialDomains::MeshPartitionMetis::create(), Nektar::FilterBenchmark::create(), Nektar::SolverUtils::FilterAverageFields::create(), Nektar::FieldUtils::OutputFld::create(), Nektar::SolverUtils::FilterHistoryPoints::create(), Nektar::UnsteadyDiffusion::create(), Nektar::UnsteadyAdvectionDiffusion::create(), Nektar::FieldUtils::OutputPts::create(), Nektar::SolverUtils::FilterThresholdMax::create(), Nektar::SolverUtils::FilterMovingAverage::create(), Nektar::SolverUtils::FilterThresholdMin::create(), Nektar::FieldUtils::OutputVtk::create(), Nektar::ForcingAxiSymmetric::create(), Nektar::SolverUtils::DriverStandard::create(), Nektar::ForcingQuasi1D::create(), Nektar::MultiRegions::GlobalLinSysIterativeFull::create(), Nektar::Utilities::ProcessCurve::create(), Nektar::FieldUtils::ProcessDOF::create(), Nektar::Utilities::ProcessExtrude::create(), Nektar::ImageWarpingSystem::create(), Nektar::Utilities::ProcessSpherigon::create(), Nektar::Projection::create(), Nektar::Utilities::InputStar::create(), Nektar::AdjointAdvection::create(), Nektar::Laplace::create(), Nektar::SkewSymmetricAdvection::create(), Nektar::NavierStokesAdvection::create(), Nektar::MultiRegions::PreconditionerLinearWithBlock::create(), Nektar::APE::create(), Nektar::MultiRegions::PreconditionerLinearWithLowEnergy::create(), Nektar::SolverUtils::DriverModifiedArnoldi::create(), Nektar::FieldUtils::ProcessBoundaryExtract::create(), Nektar::FieldUtils::ProcessConcatenateFld::create(), Nektar::EigenValuesAdvection::create(), Nektar::FieldUtils::ProcessEquiSpacedOutput::create(), Nektar::FieldUtils::ProcessFieldFromString::create(), Nektar::FieldUtils::ProcessInterpField::create(), Nektar::Utilities::ProcessLinear::create(), Nektar::FieldUtils::ProcessNumModes::create(), Nektar::FieldUtils::ProcessRemoveField::create(), Nektar::FieldUtils::ProcessStreamFunction::create(), Nektar::FieldUtils::ProcessVorticity::create(), Nektar::LEE::create(), Nektar::UnsteadyReactionDiffusion::create(), Nektar::NavierStokesCFE::create(), Nektar::SolverUtils::FilterAeroForces::create(), Nektar::BidomainRoth::create(), Nektar::MultiRegions::PreconditionerDiagonal::create(), Nektar::SolverUtils::DriverAdaptive::create(), Nektar::ForcingStabilityCoupledLNS::create(), Nektar::FieldUtils::ProcessAddCompositeID::create(), Nektar::FieldUtils::ProcessAddFld::create(), Nektar::FieldUtils::ProcessC0Projection::create(), Nektar::FieldUtils::ProcessCreateExp::create(), Nektar::FieldUtils::ProcessGrad::create(), Nektar::FieldUtils::ProcessHalfModeToFourier::create(), Nektar::FieldUtils::ProcessHomogeneousPlane::create(), Nektar::FieldUtils::ProcessHomogeneousStretch::create(), Nektar::FieldUtils::ProcessInnerProduct::create(), Nektar::FieldUtils::ProcessL2Criterion::create(), Nektar::FieldUtils::ProcessMean::create(), Nektar::FieldUtils::ProcessMeanMode::create(), Nektar::FieldUtils::ProcessMultiShear::create(), Nektar::FieldUtils::ProcessPrintFldNorms::create(), Nektar::FieldUtils::ProcessQCriterion::create(), Nektar::FieldUtils::ProcessScaleInFld::create(), Nektar::FieldUtils::ProcessScalGrad::create(), Nektar::Utilities::InputMCF::create(), Nektar::FieldUtils::ProcessSurfDistance::create(), Nektar::FieldUtils::ProcessWSS::create(), Nektar::PulseWaveSystemOutput::create(), Nektar::ShallowWaterSystem::create(), Nektar::StimulusPoint::create(), Nektar::StimulusRect::create(), Nektar::TimeDependentBC::create(), Nektar::UndefinedInOutflow::create(), Nektar::Bidomain::create(), Nektar::UInflow::create(), Nektar::WallBC::create(), Nektar::MultiRegions::PreconditionerLinearWithDiag::create(), Nektar::SolverUtils::DriverArpack::create(), Nektar::UnsteadyViscousBurgers::create(), Nektar::SolverUtils::DriverSteadyState::create(), Nektar::Dummy::create(), Nektar::FieldUtils::ProcessCombineAvg::create(), Nektar::ArterialPressureArea::create(), Nektar::FieldUtils::ProcessInterpPointDataToFld::create(), Nektar::FieldUtils::ProcessInterpPoints::create(), Nektar::FieldUtils::ProcessInterpPtsToPts::create(), Nektar::FieldUtils::ProcessMapping::create(), Nektar::FieldUtils::InputDat::create(), Nektar::FieldUtils::ProcessPointDataToFld::create(), Nektar::TimeDependentInflow::create(), Nektar::SolverUtils::CouplingFile::create(), Nektar::PulseWavePropagation::create(), Nektar::WallViscousBC::create(), Nektar::NekMeshUtils::CFIMesh::create(), Nektar::QInflow::create(), Nektar::IsentropicVortexBC::create(), Nektar::RCROutflow::create(), Nektar::RinglebFlowBC::create(), Nektar::ROutflow::create(), Nektar::LymphaticPressureArea::create(), Nektar::SubSteppingExtrapolateWeakPressure::create(), Nektar::SymmetryBC::create(), Nektar::TerminalOutflow::create(), Nektar::AInflow::create(), Nektar::NavierStokesCFEAxisym::create(), Nektar::NonlinearSWE::create(), Nektar::NonSmoothShockCapture::create(), Nektar::VanDerWaalsEoS::create(), Nektar::MultiRegions::PreconditionerBlock::create(), Nektar::PressureOutflowBC::create(), Nektar::MultiRegions::GlobalLinSysDirectFull::create(), Nektar::Utilities::ProcessBL::create(), Nektar::Utilities::ProcessDetectSurf::create(), Nektar::Utilities::ProcessExtractSurf::create(), Nektar::MultiRegions::GlobalLinSysXxtFull::create(), Nektar::Utilities::ProcessInsertSurface::create(), Nektar::Utilities::ProcessJac::create(), Nektar::Utilities::ProcessLinkCheck::create(), Nektar::IdealGasEoS::create(), Nektar::Utilities::ProcessScalar::create(), Nektar::Utilities::ProcessTetSplit::create(), Nektar::RedlichKwongEoS::create(), Nektar::RiemannInvariantBC::create(), Nektar::ExtrapOrder0BC::create(), Nektar::LinearSWE::create(), Nektar::StagnationInflowBC::create(), Nektar::MappingExtrapolate::create(), Nektar::SpatialDomains::MeshPartitionScotch::create(), Nektar::NekMeshUtils::SurfaceMesh::create(), Nektar::Monodomain::create(), Nektar::SolverUtils::FilterFieldConvert::create(), Nektar::NekMeshUtils::Generator2D::create(), Nektar::ForcingMovingBody::create(), Nektar::PressureOutflowNonReflectiveBC::create(), Nektar::FieldUtils::InputFld::create(), Nektar::Utilities::InputGmsh::create(), Nektar::FieldUtils::InputNek5000::create(), Nektar::Utilities::InputNekpp::create(), Nektar::FieldUtils::InputPts::create(), Nektar::Utilities::InputSem::create(), Nektar::FieldUtils::InputSemtex::create(), Nektar::FieldUtils::InputXml::create(), Nektar::FilterMovingBody::create(), Nektar::StimulusCirc::create(), Nektar::PengRobinsonEoS::create(), Nektar::SolverUtils::ForcingNoise::create(), Nektar::MultiRegions::PreconditionerLowEnergy::create(), Nektar::PressureInflowFileBC::create(), Nektar::MultiRegions::GlobalLinSysPETScFull::create(), Nektar::SpatialDomains::MeshGraphXmlCompressed::create(), Nektar::SolverUtils::FilterEnergy1D::create(), Nektar::SolverUtils::ForcingBody::create(), Nektar::SolverUtils::ForcingMovingReferenceFrame::create(), Nektar::MultiRegions::GlobalLinSysDirectStaticCond::create(), Nektar::SolverUtils::CouplingCwipi::create(), Nektar::GlobalMapping::MappingXYofZ::create(), Nektar::LibUtilities::CommSerial::create(), Nektar::PressureMachTemperatureBC::create(), Nektar::GlobalMapping::MappingGeneral::create(), Nektar::GlobalMapping::MappingTranslation::create(), Nektar::GlobalMapping::MappingXofXZ::create(), Nektar::GlobalMapping::MappingXofZ::create(), Nektar::GlobalMapping::MappingXYofXY::create(), Nektar::LibUtilities::CommCwipi::create(), Nektar::MultiRegions::PreconditionerLinear::create(), Nektar::Utilities::InputNek5000::create(), Nektar::WeakPressureExtrapolate::create(), Nektar::StandardExtrapolate::create(), Nektar::SolverUtils::FilterModalEnergy::create(), Nektar::SubSteppingExtrapolate::create(), Nektar::SolverUtils::ForcingAbsorption::create(), Nektar::SolverUtils::ForcingProgrammatic::create(), Nektar::Utilities::ProcessProjectCAD::create(), Nektar::LinearisedAdvection::create(), Nektar::FieldUtils::OutputTecplot::create(), Nektar::LibUtilities::CommMpi::create(), Nektar::MMFAdvection::create(), Nektar::SpatialDomains::MeshGraphHDF5::create(), Nektar::LibUtilities::NekFFTW::create(), Nektar::Utilities::InputNek::create(), Nektar::MMFSWE::create(), Nektar::SpatialDomains::MeshGraphXml::create(), Nektar::Utilities::OutputGmsh::create(), Nektar::MMFMaxwell::create(), Nektar::Utilities::ProcessVarOpti::create(), Nektar::CFLtester::create(), Nektar::CoupledLinearNS::create(), Nektar::MMFDiffusion::create(), Nektar::MultiRegions::PreconditionerNull::create(), Nektar::LibUtilities::TimeIntegrationIMEXOrder1::create(), Nektar::FieldUtils::OutputTecplotBinary::create(), Nektar::LibUtilities::TimeIntegrationIMEXOrder2::create(), Nektar::LibUtilities::TimeIntegrationIMEXOrder3::create(), Nektar::LibUtilities::TimeIntegrationIMEXOrder4::create(), Nektar::LibUtilities::FieldIOHdf5::create(), Nektar::LibUtilities::FieldIOXml::create(), Nektar::LibUtilities::TimeIntegrationIMEXdirk_1_1_1::create(), Nektar::FieldUtils::ProcessIsoContour::create(), Nektar::LibUtilities::TimeIntegrationIMEXdirk_1_2_1::create(), Nektar::LibUtilities::TimeIntegrationIMEXdirk_1_2_2::create(), Nektar::LibUtilities::TimeIntegrationIMEXdirk_4_4_3::create(), Nektar::LibUtilities::TimeIntegrationIMEXdirk_2_2_2::create(), Nektar::LibUtilities::TimeIntegrationIMEXdirk_2_3_3::create(), Nektar::LibUtilities::TimeIntegrationIMEXdirk_2_3_2::create(), Nektar::LibUtilities::TimeIntegrationIMEXdirk_3_4_3::create(), Nektar::LibUtilities::TimeIntegrationForwardEuler::create(), Nektar::LibUtilities::TimeIntegrationBackwardEuler::create(), Nektar::LibUtilities::TimeIntegrationBDFImplicitOrder1::create(), Nektar::LibUtilities::TimeIntegrationBDFImplicitOrder2::create(), Nektar::LibUtilities::TimeIntegrationMidpoint::create(), Nektar::LibUtilities::TimeIntegrationRungeKutta2::create(), Nektar::LibUtilities::TimeIntegrationRungeKutta2_ImprovedEuler::create(), Nektar::LibUtilities::TimeIntegrationRungeKutta2_SSP::create(), Nektar::LibUtilities::TimeIntegrationRungeKutta3_SSP::create(), Nektar::LibUtilities::TimeIntegrationClassicalRungeKutta4::create(), Nektar::LibUtilities::TimeIntegrationRungeKutta4::create(), Nektar::LibUtilities::TimeIntegrationRungeKutta5::create(), Nektar::LibUtilities::TimeIntegrationDIRKOrder2::create(), Nektar::LibUtilities::TimeIntegrationDIRKOrder3::create(), Nektar::LibUtilities::TimeIntegrationAdamsBashforthOrder2::create(), Nektar::LibUtilities::TimeIntegrationAdamsBashforthOrder3::create(), Nektar::LibUtilities::TimeIntegrationAdamsBashforthOrder4::create(), Nektar::LibUtilities::TimeIntegrationAdamsMoultonOrder2::create(), Nektar::LibUtilities::TimeIntegrationIMEXGear::create(), Nektar::LibUtilities::TimeIntegrationCNAB::create(), Nektar::LibUtilities::TimeIntegrationMCNAB::create(), Nektar::FieldUtils::ProcessInterpPoints::CreateFieldPts(), Nektar::FieldUtils::ProcessInterpPtsToPts::CreateFieldPts(), Nektar::StdRegions::StdExpansion::CreateGeneralMatrix(), Nektar::StdRegions::StdExpansion::CreateIndexMap(), Nektar::LocalRegions::NodalTriExp::CreateMatrix(), Nektar::LocalRegions::PyrExp::CreateMatrix(), Nektar::LocalRegions::TetExp::CreateMatrix(), Nektar::LocalRegions::PrismExp::CreateMatrix(), Nektar::LocalRegions::QuadExp::CreateMatrix(), Nektar::LocalRegions::SegExp::CreateMatrix(), Nektar::LocalRegions::TriExp::CreateMatrix(), Nektar::LocalRegions::HexExp::CreateMatrix(), Nektar::MultiRegions::PreconditionerLowEnergy::CreateRefHexGeom(), Nektar::MultiRegions::PreconditionerLowEnergy::CreateRefPrismGeom(), Nektar::MultiRegions::PreconditionerLowEnergy::CreateRefPyrGeom(), Nektar::MultiRegions::PreconditionerLowEnergy::CreateRefTetGeom(), Nektar::LocalRegions::NodalTriExp::CreateStaticCondMatrix(), Nektar::LocalRegions::PyrExp::CreateStaticCondMatrix(), Nektar::LocalRegions::TetExp::CreateStaticCondMatrix(), Nektar::LocalRegions::PrismExp::CreateStaticCondMatrix(), Nektar::LocalRegions::QuadExp::CreateStaticCondMatrix(), Nektar::LocalRegions::TriExp::CreateStaticCondMatrix(), Nektar::LocalRegions::SegExp::CreateStaticCondMatrix(), Nektar::LocalRegions::HexExp::CreateStaticCondMatrix(), Nektar::LocalRegions::NodalTriExp::CreateStdMatrix(), Nektar::StdRegions::StdExpansion::CreateStdStaticCondMatrix(), Nektar::MultiRegions::DisContField2D::DisContField2D(), Nektar::MultiRegions::DisContField3DHomogeneous1D::DisContField3DHomogeneous1D(), Nektar::MultiRegions::DisContField3DHomogeneous2D::DisContField3DHomogeneous2D(), Nektar::SolverUtils::CouplingCwipi::DumpRawFields(), Nektar::SolverUtils::EquationSystem::ErrorExtraPoints(), Nektar::Utilities::ProcessCurve::EvaluateCoordinate(), Nektar::MultiRegions::DisContField3D::EvaluateHDGPostProcessing(), Nektar::MultiRegions::DisContField2D::EvaluateHDGPostProcessing(), Nektar::SolverUtils::SessionFunction::EvaluatePts(), Nektar::MultiRegions::ExpList0D::ExpList0D(), Nektar::MultiRegions::ExpList1D::ExpList1D(), Nektar::MultiRegions::ExpList1DHomogeneous2D::ExpList1DHomogeneous2D(), Nektar::MultiRegions::ExpList2D::ExpList2D(), Nektar::MultiRegions::ExpList2DHomogeneous1D::ExpList2DHomogeneous1D(), Nektar::MultiRegions::ExpList3D::ExpList3D(), Nektar::MultiRegions::ExpList3DHomogeneous1D::ExpList3DHomogeneous1D(), Nektar::MultiRegions::ExpList3DHomogeneous2D::ExpList3DHomogeneous2D(), Nektar::MultiRegions::ExpListHomogeneous1D::ExpListHomogeneous1D(), Nektar::MultiRegions::ExpListHomogeneous2D::ExpListHomogeneous2D(), Nektar::FieldUtils::ProcessIsoContour::ExtractContour(), Nektar::MultiRegions::PreconditionerLowEnergy::ExtractLocMat(), Nektar::SolverUtils::CouplingCwipi::ExtrapolateFields(), Nektar::VortexWaveInteraction::FileRelaxation(), Nektar::MultiRegions::DisContField3D::FindPeriodicFaces(), Nektar::MultiRegions::ExpList::GenBlockMatrix(), Nektar::MultiRegions::ExpList::GeneralGetFieldDefinitions(), Nektar::MultiRegions::DisContField3D::GenerateBoundaryConditionExpansion(), Nektar::MultiRegions::DisContField2D::GenerateBoundaryConditionExpansion(), Nektar::Extrapolate::GenerateHOPBCMap(), Nektar::SpatialDomains::SegGeom::GenerateOneSpaceDimGeom(), Nektar::MultiRegions::ExpList3DHomogeneous1D::GenExpList3DHomogeneous1D(), Nektar::MultiRegions::ExpList::GenGlobalMatrix(), Nektar::MultiRegions::ExpList::GenGlobalMatrixFull(), Nektar::MultiRegions::ExpListHomogeneous1D::GenHomogeneous1DBlockMatrix(), Nektar::MultiRegions::ExpListHomogeneous2D::GenHomogeneous2DBlockMatrix(), Nektar::StdRegions::StdNodalTriExp::GenNBasisTransMatrix(), Nektar::StdRegions::StdNodalPrismExp::GenNBasisTransMatrix(), Nektar::StdRegions::StdNodalTetExp::GenNBasisTransMatrix(), Nektar::CoupledLinearNS::GenPressureExp(), Nektar::MultiRegions::DisContField1D::GetDomainBCs(), Nektar::MultiRegions::ExpList::GetExpIndex(), Nektar::LinearisedAdvection::GetFloquetBlockMatrix(), Nektar::SolverUtils::Forcing::GetFunction(), Nektar::SolverUtils::EquationSystem::GetFunction(), Nektar::NekMeshUtils::Pyramid::GetGeom(), Nektar::NekMeshUtils::Tetrahedron::GetGeom(), Nektar::NekMeshUtils::Prism::GetGeom(), Nektar::NekMeshUtils::Quadrilateral::GetGeom(), Nektar::NekMeshUtils::Triangle::GetGeom(), Nektar::NekMeshUtils::Line::GetGeom(), Nektar::NekMeshUtils::Hexahedron::GetGeom(), Nektar::NekMeshUtils::Edge::GetGeom(), Nektar::NekMeshUtils::Face::GetGeom(), Nektar::NekMeshUtils::Node::GetGeom(), Nektar::FieldUtils::ProcessQualityMetric::GetQ(), Nektar::MultiRegions::GlobalMatrix::GlobalMatrix(), Nektar::LibUtilities::FieldIOXml::ImportFieldDefs(), Nektar::ForcingMovingBody::InitialiseFilter(), Nektar::LibUtilities::TimeIntegrationScheme::InitializeScheme(), Nektar::StdRegions::StdExpansion::LaplacianMatrixOp_MatFree_GenericImpl(), Nektar::NekMeshUtils::Generator2D::MakeBL(), Nektar::NekMeshUtils::Tetrahedron::MakeOrder(), Nektar::MultiRegions::MultiLevelBisectedGraph::MultiLevelBisectedGraph(), Nektar::MultiRegions::MultiLevelBisectionReordering(), Nektar::FieldUtils::OutputPts::OutputFromExp(), Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::PrepareLocalSchurComplement(), Nektar::FieldUtils::InputDat::Process(), Nektar::FieldUtils::InputPts::Process(), Nektar::FieldUtils::InputXml::Process(), Nektar::NekMeshUtils::VolumeMesh::Process(), Nektar::NekMeshUtils::ProcessLoadOctree::Process(), Nektar::Utilities::InputNek5000::Process(), Nektar::NekMeshUtils::HOSurfaceMesh::Process(), Nektar::FieldUtils::ProcessDisplacement::Process(), Nektar::Utilities::ProcessSpherigon::Process(), Nektar::FieldUtils::ProcessEquiSpacedOutput::Process(), Nektar::FieldUtils::ProcessInterpField::Process(), Nektar::FieldUtils::ProcessHomogeneousPlane::Process(), Nektar::FieldUtils::ProcessCreateExp::Process(), Nektar::FieldUtils::ProcessPointDataToFld::Process(), Nektar::NekMeshUtils::SurfaceMesh::Process(), Nektar::FieldUtils::ProcessInterpPointDataToFld::Process(), Nektar::FieldUtils::ProcessInterpPoints::Process(), Nektar::Utilities::InputNek::Process(), Nektar::Utilities::ProcessTetSplit::Process(), Nektar::NekMeshUtils::Generator2D::Process(), Nektar::FieldUtils::ProcessIsoContour::Process(), Nektar::SpatialDomains::BoundaryConditions::ReadBoundaryConditions(), Nektar::MultiRegions::PreconditionerLowEnergy::ReSetPrismMaxRMat(), Nektar::MultiRegions::PreconditionerLowEnergy::ReSetTetMaxRMat(), Nektar::SolverUtils::CouplingCwipi::SendCallback(), Nektar::FieldUtils::Iso::SeparateRegions(), Nektar::MultiRegions::DisContField1D::SetBoundaryConditionExpansion(), Nektar::ForcingMovingBody::SetDynEqCoeffMatrix(), Nektar::LinearElasticSystem::SetStaticCondBlock(), Nektar::SolverUtils::FilterModalEnergy::SetUpBaseFields(), Nektar::MultiRegions::PreconditionerLowEnergy::SetupBlockTransformationMatrix(), Nektar::MultiRegions::DisContField3DHomogeneous2D::SetupBoundaryConditions(), Nektar::MultiRegions::DisContField3DHomogeneous1D::SetupBoundaryConditions(), Nektar::CoupledLinearNS::SetUpCoupledMatrix(), Nektar::MultiRegions::DisContField3D::SetUpDG(), Nektar::MultiRegions::DisContField2D::SetUpDG(), Nektar::MultiRegions::DisContField1D::SetUpDG(), Nektar::PulseWaveSystem::SetUpDomainInterfaces(), Nektar::FieldUtils::Field::SetUpFirstExpList(), Nektar::FieldUtils::ProcessIsoContour::SetupIsoFromFieldPts(), Nektar::MultiRegions::PreconditionerLowEnergy::SetUpPyrMaxRMat(), Nektar::SolverUtils::CouplingCwipi::SetupReceive(), Nektar::MultiRegions::PreconditionerLowEnergy::SetUpReferenceElements(), Nektar::SolverUtils::CouplingCwipi::SetupSendInterpolation(), Nektar::MultiRegions::GlobalLinSysStaticCond::SetupTopLevel(), Nektar::SpatialDomains::PyrGeom::SetUpXmap(), Nektar::SpatialDomains::PrismGeom::SetUpXmap(), Nektar::SpatialDomains::TetGeom::SetUpXmap(), Nektar::SpatialDomains::HexGeom::SetUpXmap(), Nektar::SpatialDomains::QuadGeom::SetUpXmap(), Nektar::SpatialDomains::TriGeom::SetUpXmap(), Nektar::SpatialDomains::SegGeom::SetUpXmap(), Nektar::LibUtilities::TimeIntegrationScheme::TimeIntegrate(), Nektar::Utilities::OutputNekpp::TransferComposites(), Nektar::Utilities::OutputNekpp::TransferCurves(), Nektar::Utilities::OutputNekpp::TransferEdges(), Nektar::Utilities::OutputNekpp::TransferElements(), Nektar::Utilities::OutputNekpp::TransferFaces(), Nektar::Utilities::OutputNekpp::TransferVertices(), Nektar::Extrapolate::UpdateRobinPrimCoeff(), Nektar::MultiRegions::GlobalLinSysDirectStaticCond::v_AssembleSchurComplement(), Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::v_AssembleSchurComplement(), Nektar::MultiRegions::PreconditionerLinear::v_BuildPreconditioner(), Nektar::MultiRegions::PreconditionerLowEnergy::v_BuildPreconditioner(), Nektar::LocalRegions::Expansion2D::v_BuildVertexMatrix(), Nektar::LocalRegions::PyrExp::v_CreateStdMatrix(), Nektar::LocalRegions::TetExp::v_CreateStdMatrix(), Nektar::LocalRegions::PrismExp::v_CreateStdMatrix(), Nektar::LocalRegions::QuadExp::v_CreateStdMatrix(), Nektar::LocalRegions::TriExp::v_CreateStdMatrix(), Nektar::LocalRegions::SegExp::v_CreateStdMatrix(), Nektar::LocalRegions::HexExp::v_CreateStdMatrix(), Nektar::LibUtilities::NodalUtilTriangle::v_CreateUtil(), Nektar::LibUtilities::NodalUtilTetrahedron::v_CreateUtil(), Nektar::LibUtilities::NodalUtilPrism::v_CreateUtil(), Nektar::LibUtilities::NodalUtilQuad::v_CreateUtil(), Nektar::LibUtilities::NodalUtilHex::v_CreateUtil(), Nektar::Utilities::NodalUtilTriMonomial::v_CreateUtil(), Nektar::SolverUtils::DriverAdaptive::v_Execute(), Nektar::SpatialDomains::TriGeom::v_FillGeom(), Nektar::StdRegions::StdQuadExp::v_FwdTrans_BndConstrained(), Nektar::LocalRegions::TriExp::v_FwdTrans_BndConstrained(), Nektar::LocalRegions::QuadExp::v_FwdTrans_BndConstrained(), Nektar::StdRegions::StdTriExp::v_FwdTrans_BndConstrained(), Nektar::Utilities::ProcessCurve::v_GenerateEdgeNodes(), Nektar::SpatialDomains::PyrGeom::v_GenGeomFactors(), Nektar::SpatialDomains::PrismGeom::v_GenGeomFactors(), Nektar::SpatialDomains::HexGeom::v_GenGeomFactors(), Nektar::SpatialDomains::TetGeom::v_GenGeomFactors(), Nektar::SpatialDomains::QuadGeom::v_GenGeomFactors(), Nektar::SpatialDomains::TriGeom::v_GenGeomFactors(), Nektar::SpatialDomains::SegGeom::v_GenGeomFactors(), Nektar::StdRegions::StdPointExp::v_GenMatrix(), Nektar::LocalRegions::Expansion2D::v_GenMatrix(), Nektar::StdRegions::StdQuadExp::v_GenMatrix(), Nektar::StdRegions::StdTriExp::v_GenMatrix(), Nektar::StdRegions::StdSegExp::v_GenMatrix(), Nektar::StdRegions::StdPrismExp::v_GenMatrix(), Nektar::StdRegions::StdTetExp::v_GenMatrix(), Nektar::MultiRegions::GlobalLinSys::v_GetBlock(), Nektar::MultiRegions::DisContField3DHomogeneous2D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField3D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField1D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField2D::v_GetBndElmtExpansion(), Nektar::LocalRegions::PyrExp::v_GetLinStdExp(), Nektar::LocalRegions::TetExp::v_GetLinStdExp(), Nektar::LocalRegions::PrismExp::v_GetLinStdExp(), Nektar::LocalRegions::QuadExp::v_GetLinStdExp(), Nektar::LocalRegions::TriExp::v_GetLinStdExp(), Nektar::LocalRegions::SegExp::v_GetLinStdExp(), Nektar::LocalRegions::HexExp::v_GetLinStdExp(), Nektar::LocalRegions::NodalTriExp::v_GetLinStdExp(), Nektar::MultiRegions::DisContField1D::v_GetRobinBCInfo(), Nektar::MultiRegions::DisContField3D::v_GetRobinBCInfo(), Nektar::MultiRegions::DisContField2D::v_GetRobinBCInfo(), Nektar::MultiRegions::GlobalLinSysPETScStaticCond::v_GetStaticCondBlock(), Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::v_GetStaticCondBlock(), Nektar::MultiRegions::GlobalLinSys::v_GetStaticCondBlock(), Nektar::LocalRegions::PyrExp::v_GetStdExp(), Nektar::LocalRegions::TetExp::v_GetStdExp(), Nektar::LocalRegions::PrismExp::v_GetStdExp(), Nektar::LocalRegions::QuadExp::v_GetStdExp(), Nektar::LocalRegions::TriExp::v_GetStdExp(), Nektar::LocalRegions::SegExp::v_GetStdExp(), Nektar::LocalRegions::HexExp::v_GetStdExp(), Nektar::LocalRegions::NodalTriExp::v_GetStdExp(), Nektar::LibUtilities::FieldIOHdf5::v_Import(), Nektar::LibUtilities::CsvIO::v_ImportFieldData(), Nektar::LibUtilities::PtsIO::v_ImportFieldData(), Nektar::SolverUtils::CouplingFile::v_Init(), Nektar::SolverUtils::FilterHistoryPoints::v_Initialise(), Nektar::FilterElectrogram::v_Initialise(), Nektar::ForcingQuasi1D::v_InitObject(), Nektar::ForcingAxiSymmetric::v_InitObject(), Nektar::SolverUtils::ForcingBody::v_InitObject(), Nektar::SolverUtils::Advection3DHomogeneous1D::v_InitObject(), Nektar::ImageWarpingSystem::v_InitObject(), Nektar::MultiRegions::GlobalLinSysPETScStaticCond::v_InitObject(), Nektar::LinearisedAdvection::v_InitObject(), Nektar::LinearElasticSystem::v_InitObject(), Nektar::CompressibleFlowSystem::v_InitObject(), Nektar::PulseWaveSystem::v_InitObject(), Nektar::IncNavierStokes::v_InitObject(), Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::v_InitObject(), Nektar::CoupledLinearNS::v_InitObject(), Nektar::SolverUtils::EquationSystem::v_InitObject(), Nektar::MultiRegions::AssemblyMapCG::v_LinearSpaceMap(), Nektar::MultiRegions::ExpList3D::v_ReadGlobalOptimizationParameters(), Nektar::MultiRegions::ExpList2D::v_ReadGlobalOptimizationParameters(), Nektar::StdRegions::StdTriExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdPrismExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdTetExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdPyrExp::v_ReduceOrderCoeffs(), Nektar::LocalRegions::TriExp::v_ReduceOrderCoeffs(), Nektar::SolverUtils::CouplingFile::v_Send(), and Nektar::MultiRegions::PreconditionerLowEnergy::v_TransformedSchurCompl().

162  {
163  return AllocateSharedPtrD( [](DataType *){}, args...);
164  }
static std::shared_ptr< DataType > AllocateSharedPtrD(const DeallocatorType &d, const Args &...args)

◆ AllocateSharedPtrD()

template<typename DataType>
template<typename DeallocatorType , typename... Args>
static std::shared_ptr<DataType> Nektar::MemoryManager< DataType >::AllocateSharedPtrD ( const DeallocatorType &  d,
const Args &...  args 
)
inlinestatic

Definition at line 167 of file NekMemoryManager.hpp.

References Nektar::MemoryManager< DataType >::Allocate(), and Nektar::MemoryManager< DataType >::Deallocate().

Referenced by Nektar::MemoryManager< DataType >::AllocateSharedPtr(), and Nektar::CreateStorage().

169  {
170  DataType* data = Allocate(args...);
171  return std::shared_ptr<DataType>(
172  data, [=](DataType *ptr){
173  d(ptr);
175  });
176  }
static void Deallocate(DataType *&data)
Deallocate a pointer allocated by MemoryManager::Allocate.
static DataType * Allocate(const Args &...args)
Allocates a single object from the memory pool.

◆ construct()

template<typename DataType>
void Nektar::MemoryManager< DataType >::construct ( pointer  p,
const_reference  val 
)
inline

Definition at line 249 of file NekMemoryManager.hpp.

References CellMLToNektar.cellml_metadata::p.

250  {
251  new(p) DataType(val);
252  }

◆ Deallocate()

template<typename DataType>
static void Nektar::MemoryManager< DataType >::Deallocate ( DataType *&  data)
inlinestatic

Deallocate a pointer allocated by MemoryManager::Allocate.

Note
Results are undefined if called with a pointer to something that was not allocated with the memory manager.

Use this method to deallocate a pointer you have allocated from the MemoryManager using the Allocate method.

Example:

CustObj* c = MemoryManager::Allocate<CustObj>();

Definition at line 99 of file NekMemoryManager.hpp.

References Nektar::MemoryManager< DataType >::Allocate(), Nektar::MemPool::Allocate(), Nektar::MemPool::Deallocate(), and Nektar::GetMemoryPool().

Referenced by Nektar::MemoryManager< DataType >::AllocateSharedPtrD().

100  {
101 #ifdef NEKTAR_MEMORY_POOL_ENABLED
102  data->~DataType();
103  GetMemoryPool().Deallocate(data, sizeof(DataType));
104 #else
105  delete data;
106 #endif
107 
108  data = NULL;
109  }
void Deallocate(void *p, size_t bytes)
Deallocate memory claimed by an earlier call to allocate.
MemPool & GetMemoryPool()

◆ deallocate()

template<typename DataType>
void Nektar::MemoryManager< DataType >::deallocate ( pointer  p,
size_type  n 
)
inline

Definition at line 244 of file NekMemoryManager.hpp.

References Nektar::MemoryManager< DataType >::RawDeallocate().

245  {
246  return RawDeallocate(p, n);
247  }
static void RawDeallocate(DataType *array, size_t NumberOfElements)
Deallocates memory allocated from RawAllocate.

◆ destroy()

template<typename DataType>
void Nektar::MemoryManager< DataType >::destroy ( pointer  p)
inline

Definition at line 254 of file NekMemoryManager.hpp.

255  {
256  p->~DataType();
257  }

◆ max_size()

template<typename DataType>
size_type Nektar::MemoryManager< DataType >::max_size ( )
inline

Definition at line 259 of file NekMemoryManager.hpp.

260  {
261  return std::numeric_limits<size_type>::max()/sizeof(DataType);
262  }

◆ RawAllocate()

template<typename DataType>
static DataType* Nektar::MemoryManager< DataType >::RawAllocate ( size_t  NumberOfElements)
inlinestatic

Allocates a chunk of raw, uninitialized memory, capable of holding NumberOfElements objects.

Parameters
NumberOfElementsThe number of elements the array should be capable of holding.

This method is not meant to be called by client code. Use Array instead. Any memory allocated from this method must be returned to the memory pool via RawDeallocate. Failure to do so will result in memory leaks and undefined behavior.

Definition at line 188 of file NekMemoryManager.hpp.

References Nektar::MemPool::Allocate(), and Nektar::GetMemoryPool().

Referenced by Nektar::MemoryManager< DataType >::allocate(), Nektar::CreateStorage(), and Nektar::Array< OneD, const DataType >::CreateStorage().

189  {
190 #ifdef NEKTAR_MEMORY_POOL_ENABLED
191  return static_cast<DataType*>(GetMemoryPool().Allocate(sizeof(DataType)*NumberOfElements));
192 #else //NEKTAR_MEMORY_POOL_ENABLED
193  return static_cast<DataType*>(::operator new(NumberOfElements * sizeof(DataType)));
194 #endif //NEKTAR_MEMORY_POOL_ENABLED
195  }
void * Allocate(size_t bytes)
Allocate a block of memory of size ByteSize.
MemPool & GetMemoryPool()

◆ RawDeallocate()

template<typename DataType>
static void Nektar::MemoryManager< DataType >::RawDeallocate ( DataType *  array,
size_t  NumberOfElements 
)
inlinestatic

Deallocates memory allocated from RawAllocate.

Parameters
arrayA pointer to the memory returned from RawAllocate.
NumberOfElementsThe number of object held in the array.

This method is not meant to be called by client code. Use Array instead. Only memory allocated via RawAllocate should be returned to the pool here.

Definition at line 204 of file NekMemoryManager.hpp.

References Nektar::MemPool::Deallocate(), and Nektar::GetMemoryPool().

Referenced by Nektar::CreateStorage(), Nektar::MemoryManager< DataType >::deallocate(), Nektar::Array< OneD, const DataType >::operator=(), and Nektar::Array< OneD, const DataType >::~Array().

205  {
206 #ifdef NEKTAR_MEMORY_POOL_ENABLED
207  GetMemoryPool().Deallocate(array, sizeof(DataType)*NumberOfElements);
208 #else //NEKTAR_MEMORY_POOL_ENABLED
209  ::operator delete(array);
210 #endif //NEKTAR_MEMORY_POOL_ENABLED
211  }
void Deallocate(void *p, size_t bytes)
Deallocate memory claimed by an earlier call to allocate.
MemPool & GetMemoryPool()