44 #ifndef TEUCHOS_GENERAL_MT_UNITTESTS_HPP 
   45 #define TEUCHOS_GENERAL_MT_UNITTESTS_HPP 
   51 #define TEUCHOS_THREAD_SAFE_UNIT_TESTS_THREADS_USED 4 
   60 static void convenience_log_progress(
int cycle, 
int totalCycles) {
 
   62     std::cout << 
"Percent complete: "; 
 
   65   int mod = (totalCycles/10);
 
   67   if((cycle % (mod == 0 ? 1 : mod) == 0) || (cycle == totalCycles-1)) {
 
   69       (int)( 100.0
f * (
float) cycle / (float) (totalCycles-1) ) << 
"% ";
 
   72     std::flush( std::cout );
 
   82   CatchMemoryLeak() { ++s_countAllocated; }
 
   83   ~CatchMemoryLeak() { --s_countAllocated; }
 
   84   static std::atomic<int> s_countAllocated;
 
   85   static std::atomic<int> s_countDeallocs;
 
   89 std::atomic<int> CatchMemoryLeak::s_countAllocated(0);
 
   91 std::atomic<int> CatchMemoryLeak::s_countDeallocs(0);
 
   96 class ThreadTestManager
 
  100   static std::atomic<bool> s_bAllowThreadsToRun;
 
  103   static std::atomic<bool> s_bMainThreadSetToNull;
 
  105   static std::atomic<int> s_countCompletedThreads;
 
  109   static std::atomic<int> s_countWritingThreadCycles;
 
  111 std::atomic<bool> ThreadTestManager::s_bAllowThreadsToRun(
false);
 
  112 std::atomic<bool> ThreadTestManager::s_bMainThreadSetToNull(
false);
 
  113 std::atomic<int> ThreadTestManager::s_countCompletedThreads(0);
 
  114 std::atomic<int> ThreadTestManager::s_countWritingThreadCycles(0);
 
  117 #define UNSET_CYCLE_INDEX -1 
  122 struct Cycle_Index_Tracker
 
  124   Cycle_Index_Tracker()
 
  135   int missedDanglingOnFirstCycle;
 
  137   int danglingReference;
 
  145   std::atomic<int> trackCycle;
 
  150 #endif // end #ifdef TEUCHOS_GENERAL_MT_UNITTESTS_HPP 
Teuchos header file which uses auto-configuration information to include necessary C++ headers...
 
#define UNSET_CYCLE_INDEX