38 #ifndef vtkParallelTimer_h 39 #define vtkParallelTimer_h 41 #define vtkParallelTimerDEBUG -1 44 #include "vtkRenderingParallelLICModule.h" 49 #if vtkParallelTimerDEBUG > 0 53 class vtkParallelTimerBuffer;
92 vtkSetMacro(WriterRank,
int);
93 vtkGetMacro(WriterRank,
int);
102 vtkSetStringMacro(FileName);
103 vtkGetStringMacro(FileName);
117 void StartEvent(
const char* event);
118 void StartEvent(
int rank,
const char* event);
119 void EndEvent(
const char* event);
120 void EndEvent(
int rank,
const char* event);
121 void EndEventSynch(
const char* event);
122 void EndEventSynch(
int rank,
const char* event);
128 template <
typename T>
173 static void DeleteGlobalInstance();
180 vtkSetMacro(WriteOnClose,
int);
181 vtkGetMacro(WriteOnClose,
int);
189 vtkSetMacro(GlobalLevel,
int);
190 vtkGetMacro(GlobalLevel,
int);
204 class VTKRENDERINGPARALLELLIC_EXPORT vtkParallelTimerDestructor
207 vtkParallelTimerDestructor()
211 ~vtkParallelTimerDestructor();
226 std::vector<double> StartTime;
227 #if vtkParallelTimerDEBUG < 0 228 std::vector<std::string> EventId;
231 vtkParallelTimerBuffer* Log;
234 static vtkParallelTimerDestructor GlobalInstanceDestructor;
236 std::ostringstream HeaderBuffer;
243 template <
typename T>
246 if (this->WorldRank == this->WriterRank)
248 this->HeaderBuffer << s;
249 #if vtkParallelTimerDEBUG > 0 257 template <
typename T>
262 if (log->WorldRank == log->WriterRank)
264 log->HeaderBuffer << s;
265 #if vtkParallelTimerDEBUG > 0 274 template <
typename T>
280 #if vtkParallelTimerDEBUG > 0
friend class LogHeaderType
abstract base class for most VTK objects
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
LogBodyType & operator<<(const T &s)
Type used to direct an output stream into the log's body.
Provides distributed log functionality.
void SetFileName(const std::string &fileName)
static vtkParallelTimer * GetGlobalInstance()
The log class implements the singleton pattern so that it may be shared across class boundaries...
vtkParallelTimer::LogBodyType GetBody()
stream output to log body(all ranks).
VTKCOMMONCORE_EXPORT ostream & operator<<(ostream &os, const vtkIndent &o)
vtkParallelTimer::LogHeaderType GetHeader()
stream output to the log's header(root rank only).
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
friend VTKCOMMONCORE_EXPORT ostream & operator<<(ostream &os, vtkObjectBase &o)
vtkParallelTimer & operator<<(const T &s)
Insert text into the log header on the writer rank.