Ignore:
Timestamp:
11/19/18 15:52:54 (5 years ago)
Author:
yushan
Message:

branch_openmp merged with trunk r1597

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_trunk_omp/src/log.cpp

    r523 r1601  
    11#include "log.hpp" 
     2#include <string> 
     3#include <iostream> 
     4#include <string> 
    25 
    36namespace xios 
    47{ 
     8  std::filebuf* info_FB[16]; 
     9 
     10 
    511  CLog info("info") ; 
    612  CLog report("report") ; 
    713  CLog error("error", cerr.rdbuf()) ; 
     14 
     15   
     16  CLog& CLog::operator()(int l) 
     17    { 
     18      if (l<=level) 
     19      { 
     20        omp_set_lock( &mutex ); 
     21        rdbuf(strBuf_array[omp_get_thread_num()]);  
     22        *this<<"-> "<<name<<" : " ; 
     23        omp_unset_lock( &mutex ); 
     24      } 
     25      else rdbuf(NULL) ; 
     26      return *this; 
     27    } 
    828} 
Note: See TracChangeset for help on using the changeset viewer.