38 #ifndef vtkParallelTimer_h
39 #define vtkParallelTimer_h
41 #define vtkParallelTimerDEBUG -1
44 #include "vtkRenderingParallelLICModule.h"
49 #if vtkParallelTimerDEBUG > 0
53 class vtkParallelTimerBuffer;
91 vtkGetMacro(WriterRank,
int);
100 vtkSetStringMacro(FileName);
105 { this->SetFileName(fileName.c_str()); }
116 void StartEvent(
const char *event);
117 void StartEvent(
int rank,
const char *event);
118 void EndEvent(
const char *event);
119 void EndEvent(
int rank,
const char *event);
120 void EndEventSynch(
const char *event);
121 void EndEventSynch(
int rank,
const char *event);
174 static void DeleteGlobalInstance();
182 vtkGetMacro(WriteOnClose,
int);
191 vtkGetMacro(GlobalLevel,
int);
205 class VTKRENDERINGPARALLELLIC_EXPORT vtkParallelTimerDestructor
208 vtkParallelTimerDestructor() : Log(0) {}
209 ~vtkParallelTimerDestructor();
224 std::vector<double> StartTime;
225 #if vtkParallelTimerDEBUG < 0
226 std::vector<std::string> EventId;
229 vtkParallelTimerBuffer *Log;
232 static vtkParallelTimerDestructor GlobalInstanceDestructor;
234 std::ostringstream HeaderBuffer;
244 if (this->WorldRank == this->WriterRank)
246 this->HeaderBuffer << s;
247 #if vtkParallelTimerDEBUG > 0
260 if (log->WorldRank == log->WriterRank)
262 log->HeaderBuffer << s;
263 #if vtkParallelTimerDEBUG > 0
278 #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.
virtual void Update()
Updates the extensions string.
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 ditributed log functionality.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
void SetFileName(const std::string &fileName)
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
static vtkParallelTimer * GetGlobalInstance()
The log class implements the singleton patern so that it may be shared accross 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.