40#ifndef TEUCHOS_PERFORMANCEMONITORBASE_H
41#define TEUCHOS_PERFORMANCEMONITORBASE_H
91 const Array<std::string>& localNames,
92 Array<std::string>& globalNames,
107 Array<std::string>& globalNames,
243 format_ ==
nullptr, std::logic_error,
"Teuchos::PerformanceMonitorBase::"
244 "format: Should never get here! format_ is nullptr.");
295 counters_ =
new std::map<std::string, RCP<T> > ();
303 counters_ ==
nullptr, std::logic_error,
"Teuchos::PerformanceMonitorBase::"
304 "counters: Should never get here! counters_ is nullptr.");
328 std::map<std::string, RCP<T> >*
335 typedef std::map<std::string, RCP<T> > map_type;
336 typedef typename map_type::iterator
iter_type;
338 map_type&
ctrs = counters ();
343#ifdef HAVE_TEUCHOS_DEBUG
347 "getNewCounter: insert() claims that timer \"" << name <<
"\" was "
348 "already there in the map, even though find() claims that it was not. "
349 "Please report this bug to the Teuchos developers.");
356#ifdef HAVE_TEUCHOS_DEBUG
358 it->second.is_null (), std::logic_error,
359 "getNewCounter: Timer \"" << name <<
"\" was already there in the map, "
360 "but looking it up by name resulted in a null timer. "
361 "Please report this bug to the Teuchos developers.");
363 name !=
it->second->name (), std::logic_error,
364 "getNewCounter: Timer \"" << name <<
"\" was already there in the map, "
365 "but looking it up by name resulted in a timer with a different name \""
366 <<
it->second->name () <<
"\". Please report this bug to the Teuchos "
371#ifdef HAVE_TEUCHOS_DEBUG
374 "getNewCounter: At end of method, when creating timer \"" << name
375 <<
"\", newCounter is null. Please report this bug to the Teuchos "
385 typedef std::map<std::string, RCP<T> > map_type;
386 typedef typename map_type::iterator
iter_type;
388 map_type&
ctrs = counters ();
401 counters ().erase (name);
408 counters ().clear ();
Templated array class derived from the STL std::vector.
Teuchos header file which uses auto-configuration information to include necessary C++ headers.
Reference-counted pointer class and non-member templated function implementations.
Concrete serial communicator subclass.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
ECounterSetOp
Set operation type for mergeCounterNames() to perform.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.
void mergeCounterNames(const Comm< int > &comm, const Array< std::string > &localNames, Array< std::string > &globalNames, const ECounterSetOp setOp)
Merge counter names over all processors.
void unsortedMergePair(const Array< std::string > &localNames, Array< std::string > &globalNames, const ECounterSetOp setOp)