MFEM  v4.6.0
Finite element discretization library
Classes | Namespaces | Enumerations | Functions | Variables
mem_manager.hpp File Reference

Go to the source code of this file.

Classes

class  mfem::Memory< T >
 Class used by MFEM to store pointers to host and/or device memory. More...
 
class  mfem::MemoryManager
 

Namespaces

 mfem
 

Enumerations

enum  mfem::MemoryType {
  mfem::MemoryType::HOST, mfem::MemoryType::HOST_32, mfem::MemoryType::HOST_64, mfem::MemoryType::HOST_DEBUG,
  mfem::MemoryType::HOST_UMPIRE, mfem::MemoryType::HOST_PINNED, mfem::MemoryType::MANAGED, mfem::MemoryType::DEVICE,
  mfem::MemoryType::DEVICE_DEBUG, mfem::MemoryType::DEVICE_UMPIRE, mfem::MemoryType::DEVICE_UMPIRE_2, mfem::MemoryType::SIZE,
  mfem::MemoryType::PRESERVE, mfem::MemoryType::DEFAULT
}
 Memory types supported by MFEM. More...
 
enum  mfem::MemoryClass {
  mfem::MemoryClass::HOST, mfem::MemoryClass::HOST_32, mfem::MemoryClass::HOST_64, mfem::MemoryClass::DEVICE,
  mfem::MemoryClass::MANAGED
}
 Memory classes identify sets of memory types. More...
 

Functions

bool mfem::IsHostMemory (MemoryType mt)
 Return true if the given memory type is in MemoryClass::HOST. More...
 
bool mfem::IsDeviceMemory (MemoryType mt)
 Return true if the given memory type is in MemoryClass::DEVICE. More...
 
MemoryType mfem::GetMemoryType (MemoryClass mc)
 Return a suitable MemoryType for a given MemoryClass. More...
 
bool mfem::MemoryClassContainsType (MemoryClass mc, MemoryType mt)
 Return true iff the MemoryType mt is contained in the MemoryClass mc. More...
 
MemoryClass mfem::operator* (MemoryClass mc1, MemoryClass mc2)
 Return a suitable MemoryClass from a pair of MemoryClasses. More...
 
void mfem::MemoryPrintFlags (unsigned flags)
 Print the state of a Memory object based on its internal flags. Useful in a debugger. See also Memory<T>::PrintFlags(). More...
 

Variables

constexpr int mfem::MemoryTypeSize = static_cast<int>(MemoryType::SIZE)
 Static casts to 'int' and sizes of some useful memory types. More...
 
constexpr int mfem::HostMemoryType = static_cast<int>(MemoryType::HOST)
 
constexpr int mfem::HostMemoryTypeSize = static_cast<int>(MemoryType::DEVICE)
 
constexpr int mfem::DeviceMemoryType = static_cast<int>(MemoryType::MANAGED)
 
constexpr int mfem::DeviceMemoryTypeSize = MemoryTypeSize - DeviceMemoryType