Gromacs
2016.6
|
Internal GROMACS namespace.
This namespace is used to contain some implementation-specific functions and classes. These are not meant for direct user access, but typically reside in public headers because of implementation reasons.
Namespaces | |
anonymous_namespace{selection.cpp} | |
Classes | |
class | AnalysisDataHandleImpl |
Private implementation class for AnalysisDataHandle. More... | |
class | AnalysisDataStorageImpl |
Private implementation class for AnalysisDataStorage. More... | |
class | AnalysisDataStorageFrameData |
Internal representation for a single stored frame. More... | |
class | BasicAverageHistogramModule |
Implements average histogram module that averages per-frame histograms. More... | |
class | BasicHistogramImpl |
Base class for private implementation classes for histogram modules. More... | |
class | EnumIndexStoreInterface |
Interface for handling storage of the enum indexes. More... | |
class | EnumIndexStore |
Type-specific implementation for EnumIndexStoreInterface. More... | |
class | OptionsImpl |
Private implementation class for Options. More... | |
class | SelectionData |
Internal data for a single selection. More... | |
class | IExceptionInfo |
Base class for ExceptionInfo. More... | |
Typedefs | |
typedef std::unique_ptr < AnalysisDataStorageFrame > | AnalysisDataFrameBuilderPointer |
Smart pointer type for managing a storage frame builder. | |
typedef std::vector < std::exception_ptr > | NestedExceptionList |
Internal container type for storing a list of nested exceptions. | |
typedef std::unique_ptr < IExceptionInfo > | ExceptionInfoPointer |
Smart pointer to manage IExceptionInfo ownership. | |
Functions | |
AbstractOptionStorage * | createEnumOptionStorage (const AbstractOption &option, const char *const *enumValues, int count, int defaultValue, int defaultValueIfSet, EnumIndexStoreInterface *store) |
Helper to create EnumOptionStorage instances. More... | |
static void * | alignedMallocGeneric (std::size_t bytes, std::size_t alignment) |
Allocate aligned memory in a fully portable way. More... | |
static void | alignedFreeGeneric (void *p) |
Free aligned memory. More... | |
void * | alignedMalloc (std::size_t bytes) |
Allocate aligned memory. More... | |
void | alignedFree (void *p) |
Free aligned memory. More... | |
template<typename T > | |
static void | ignoreValueHelper (const T &) |
Helper for ignoring values in macros. More... | |
void | current_function_helper () |
Helper for defining GMX_CURRENT_FUNCTION. | |
void | printFatalErrorHeader (FILE *fp, const char *title, const char *func, const char *file, int line) |
Formats a common header for fatal error messages. More... | |
void | printFatalErrorMessageLine (FILE *fp, const char *text, int indent) |
Formats a line of fatal error message text. More... | |
void | printFatalErrorFooter (FILE *fp) |
Formats a common footer for fatal error messages. More... | |
void | assertHandler (const char *condition, const char *msg, const char *func, const char *file, int line) |
Called when an assert fails. More... | |
void gmx::internal::alignedFree | ( | void * | p | ) |
Free aligned memory.
p | Memory pointer previously returned from gmx::internal::alignedMalloc() |
|
static |
Free aligned memory.
p | Memory pointer previously returned from gmx::internal::alignedFreePortable(). |
Since this routine relies on the original pointer being stored just before the memory area p points to, bad things will happen if you call this routine with a pointer obtained any other way, or if you call the system free() with a pointer obtained from std::alignedMalloc().
void * gmx::internal::alignedMalloc | ( | std::size_t | bytes | ) |
Allocate aligned memory.
bytes | Amount of memory (bytes) to allocate. It is valid to ask for 0 bytes, which will return a non-null pointer that is properly aligned and padded (but that you should not use). |
The memory will always be aligned to 128 bytes, which is our estimate of the longest cache lines on architectures currently in use. It will also be padded by the same amount at the end of the area, to help avoid false cache sharing.
|
static |
Allocate aligned memory in a fully portable way.
bytes | Amount of memory (bytes) to allocate. The routine will return nullptr if the allocation fails. However, note that asking for zero bytes will return a pointer that is non-null and properly aligned (but obviously you cannot use it, since you promised not to access data beyond the 0 bytes you asked for). |
alignment | Alignment specification in bytes, must be a power of 2. |