10 #ifndef TEUCHOS_GENERAL_MT_UNITTESTS_HPP 
   11 #define TEUCHOS_GENERAL_MT_UNITTESTS_HPP 
   17 #define TEUCHOS_THREAD_SAFE_UNIT_TESTS_THREADS_USED 4 
   26 static void convenience_log_progress(
int cycle, 
int totalCycles) {
 
   28     std::cout << 
"Percent complete: "; 
 
   31   int mod = (totalCycles/10);
 
   33   if((cycle % (mod == 0 ? 1 : mod) == 0) || (cycle == totalCycles-1)) {
 
   35       (int)( 100.0
f * (
float) cycle / (float) (totalCycles-1) ) << 
"% ";
 
   38     std::flush( std::cout );
 
   48   CatchMemoryLeak() { ++s_countAllocated; }
 
   49   ~CatchMemoryLeak() { --s_countAllocated; }
 
   50   static std::atomic<int> s_countAllocated;
 
   51   static std::atomic<int> s_countDeallocs;
 
   55 std::atomic<int> CatchMemoryLeak::s_countAllocated(0);
 
   57 std::atomic<int> CatchMemoryLeak::s_countDeallocs(0);
 
   62 class ThreadTestManager
 
   66   static std::atomic<bool> s_bAllowThreadsToRun;
 
   69   static std::atomic<bool> s_bMainThreadSetToNull;
 
   71   static std::atomic<int> s_countCompletedThreads;
 
   75   static std::atomic<int> s_countWritingThreadCycles;
 
   77 std::atomic<bool> ThreadTestManager::s_bAllowThreadsToRun(
false);
 
   78 std::atomic<bool> ThreadTestManager::s_bMainThreadSetToNull(
false);
 
   79 std::atomic<int> ThreadTestManager::s_countCompletedThreads(0);
 
   80 std::atomic<int> ThreadTestManager::s_countWritingThreadCycles(0);
 
   83 #define UNSET_CYCLE_INDEX -1 
   88 struct Cycle_Index_Tracker
 
  101   int missedDanglingOnFirstCycle;
 
  103   int danglingReference;
 
  111   std::atomic<int> trackCycle;
 
  116 #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