54TimerArray_t timerArray;
68 timerArray.back()->start();
69 return timerArray.
size()-1;
73 timerID >= implicit_cast<int>(timerArray.size()), std::logic_error,
74 "Teuchos_startTimer(...): Error, timerID="<<timerID
75 <<
" is >= timerArray.size()="<<timerArray.size()
76 <<
" for timerName=\""<<timerName<<
"\"!"
80 timer->isRunning(), std::logic_error,
81 "Teuchos_startTimer(...): Error, timerID="<<timerID
82 <<
", timerName=\""<<timerName<<
"\" is already running!"
101 timerID < 0 || timerID >= implicit_cast<int>(timerArray.size()),
103 "Teuchos_stopTimer(...): Error, timerID="<<timerID<<
" is invalid!"
108 timer->incrementNumCalls();
int Teuchos_startTimer(char timerName[], int timerID)
Start a timer with a given name and ID.
void Teuchos_stopTimer(int timerID)
Stop a timer that was started with Teuchos_startTimer().
#define TEUCHOS_STANDARD_CATCH_STATEMENTS(VERBOSE, ERR_STREAM, SUCCESS_FLAG)
Simple macro that catches and reports standard exceptions and other exceptions.
Scope guard for Teuchos::Time, with MPI collective timer reporting.
int size(const Comm< Ordinal > &comm)
Get the number of processes in the communicator.
Concrete serial communicator subclass.
static RCP< FancyOStream > getDefaultOStream()
Get the default output stream object.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
TypeTo implicit_cast(const TypeFrom &t)
Perform an implicit cast of concrete types with the casted object returned by value.