25 #include "libmesh/reference_counter.h" 34 #if defined(LIBMESH_ENABLE_REFERENCE_COUNTING) && defined(DEBUG) 49 #if defined(LIBMESH_ENABLE_REFERENCE_COUNTING) && defined(DEBUG) 51 std::ostringstream oss;
54 <<
" ---------------------------------------------------------------------------- \n" 55 <<
"| Reference count information |\n" 56 <<
" ---------------------------------------------------------------------------- \n";
59 oss <<
"| " <<
name <<
" reference count information:\n" 60 <<
"| Creations: " << cd.first <<
'\n' 61 <<
"| Destructions: " << cd.second <<
'\n';
63 oss <<
" ---------------------------------------------------------------------------- \n";
79 #if defined(LIBMESH_ENABLE_REFERENCE_COUNTING) && defined(DEBUG) std::string name(const ElemQuality q)
This function returns a string containing some name for q.
static Threads::atomic< unsigned int > _n_objects
The number of objects.
static void print_info(std::ostream &out_stream=libMesh::out)
Prints the reference information, by default to libMesh::out.
The libMesh namespace provides an interface to certain functionality in the library.
std::map< std::string, std::pair< unsigned int, unsigned int > > Counts
Data structure to log the information.
static std::string get_info()
Gets a string containing the reference information.
static Threads::spin_mutex _mutex
Mutual exclusion object to enable thread-safe reference counting.
static bool _enable_print_counter
Flag to control whether reference count information is printed when print_info is called...
static void enable_print_counter_info()
Methods to enable/disable the reference counter output from print_info()
tbb::spin_mutex spin_mutex
Spin mutex.
static Counts _counts
Actually holds the data.
static void disable_print_counter_info()