Motiv
Marvelous OTF2 Traces Interactive Visualizer
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
SubTrace Class Reference

Trace representing a section of a larger trace. More...

#include <SubTrace.hpp>

Inheritance diagram for SubTrace:
Inheritance graph
[legend]
Collaboration diagram for SubTrace:
Collaboration graph
[legend]

Public Member Functions

std::map< otf2::definition::location_group *, Range< Slot * >, LocationGroupCmpgetSlots () const override
 Returns a map of slots of the current trace. More...
 
otf2::chrono::duration getRuntime () const override
 Returns the runtime of the current trace. More...
 
Tracesubtrace (otf2::chrono::duration from, otf2::chrono::duration to) override
 Creates a subtrace of the current trace. More...
 
Range< Communication * > getCommunications () override
 Returns communication objects of the current trace. More...
 
Range< CollectiveCommunicationEvent * > getCollectiveCommunications () override
 Returns communication objects of the current trace. More...
 
otf2::chrono::duration getStartTime () const override
 Returns the start time of the current object. More...
 
types::TraceTime getEndTime () const override
 Returns the end time of the current object. More...
 
types::TraceTime getDuration () const override
 Returns the duration of the current object. More...
 
 SubTrace ()
 
 SubTrace (std::map< otf2::definition::location_group *, Range< Slot * >, LocationGroupCmp > &slots, const Range< Communication * > &communications, const Range< CollectiveCommunicationEvent * > &collectiveCommunications, const otf2::chrono::duration &runtime, const otf2::chrono::duration &startTime)
 
virtual std::map< otf2::definition::location_group *, Range< Slot * >, LocationGroupCmpgetSlots () const =0
 Returns a map of slots of the current trace. More...
 
virtual Range< Communication * > getCommunications ()=0
 Returns communication objects of the current trace. More...
 
virtual Range< CollectiveCommunicationEvent * > getCollectiveCommunications ()=0
 Returns collective communication events of the current trace. More...
 
virtual otf2::chrono::duration getRuntime () const =0
 Returns the runtime of the current trace. More...
 
virtual Tracesubtrace (otf2::chrono::duration from, otf2::chrono::duration to)=0
 Creates a subtrace of the current trace. More...
 
virtual types::TraceTime getStartTime () const =0
 Returns the start time of the current object. More...
 
virtual types::TraceTime getEndTime () const =0
 Returns the end time of the current object. More...
 
virtual types::TraceTime getDuration () const
 Returns the duration of the current object. More...
 

Protected Attributes

std::map< otf2::definition::location_group *, Range< Slot * >, LocationGroupCmpslots_
 
Range< Communication * > communications_
 
Range< CollectiveCommunicationEvent * > collectiveCommunications_
 
otf2::chrono::duration runtime_ {}
 
otf2::chrono::duration startTime_ {}
 

Detailed Description

Trace representing a section of a larger trace.

Definition at line 28 of file SubTrace.hpp.

Constructor & Destructor Documentation

◆ SubTrace() [1/2]

SubTrace::SubTrace ( )

Initializes an empty subtrace

Definition at line 35 of file SubTrace.cpp.

◆ SubTrace() [2/2]

SubTrace::SubTrace ( std::map< otf2::definition::location_group *, Range< Slot * >, LocationGroupCmp > &  slots,
const Range< Communication * > &  communications,
const Range< CollectiveCommunicationEvent * > &  collectiveCommunications,
const otf2::chrono::duration &  runtime,
const otf2::chrono::duration &  startTime 
)

Initializes a new instance.

Parameters
slotsRange of slots this subtrace covers
communicationsRange of communications this subtrace covers
collectiveCommunicationsRange of collective communication this subtrace covers
runtimeRuntime of this subtrace

Definition at line 24 of file SubTrace.cpp.

Member Function Documentation

◆ getCollectiveCommunications()

Range< CollectiveCommunicationEvent * > SubTrace::getCollectiveCommunications ( )
overridevirtual

Returns communication objects of the current trace.

This pure virtual function returns communication objects of the current trace. The function has to be implemented in the derived classes.

Returns
communication objects of the current trace.

Implements Trace.

Definition at line 54 of file SubTrace.cpp.

◆ getCommunications()

Range< Communication * > SubTrace::getCommunications ( )
overridevirtual

Returns communication objects of the current trace.

This pure virtual function returns communication objects of the current trace. The function has to be implemented in the derived classes.

Returns
communication objects of the current trace.

Implements Trace.

Definition at line 50 of file SubTrace.cpp.

◆ getDuration()

types::TraceTime SubTrace::getDuration ( ) const
overridevirtual

Returns the duration of the current object.

This function calculates and returns the duration of the current object, which is the difference between its end time and start time. The function can be overridden in the derived classes if necessary.

Returns
The duration of the current object.

Reimplemented from TimedElement.

Definition at line 117 of file SubTrace.cpp.

◆ getEndTime()

types::TraceTime SubTrace::getEndTime ( ) const
overridevirtual

Returns the end time of the current object.

This pure virtual function returns the end time of the current object. The function has to be implemented in the derived classes.

Returns
The end time of the current object.

Implements TimedElement.

Definition at line 113 of file SubTrace.cpp.

◆ getRuntime()

otf2::chrono::duration SubTrace::getRuntime ( ) const
overridevirtual

Returns the runtime of the current trace.

This pure virtual function returns the runtime of the current trace. The function has to be implemented in the derived classes.

Returns
The runtime of the current trace.

Implements Trace.

Definition at line 46 of file SubTrace.cpp.

◆ getSlots()

std::map< otf2::definition::location_group *, Range< Slot * >, LocationGroupCmp > SubTrace::getSlots ( ) const
overridevirtual

Returns a map of slots of the current trace.

This pure virtual function returns a map of slots of the current trace. The function has to be implemented in the derived classes.

Returns
A map of slots of the current trace.

Implements Trace.

Definition at line 42 of file SubTrace.cpp.

◆ getStartTime()

otf2::chrono::duration SubTrace::getStartTime ( ) const
overridevirtual

Returns the start time of the current object.

This pure virtual function returns the start time of the current object. The function has to be implemented in the derived classes.

Returns
The start time of the current object.

Implements TimedElement.

Definition at line 58 of file SubTrace.cpp.

◆ subtrace()

Trace * SubTrace::subtrace ( otf2::chrono::duration  from,
otf2::chrono::duration  to 
)
overridevirtual

Creates a subtrace of the current trace.

This pure virtual function creates a subtrace of the current trace by returning a new Trace object that only contains elements within the given time range. The function has to be implemented in the derived classes.

Parameters
fromTime the the subtrace should start.
toTime the subtrace should end.
Returns
A new Trace object that only contains elements within the given time range.

Implements Trace.

Reimplemented in UITrace.

Definition at line 93 of file SubTrace.cpp.

Member Data Documentation

◆ collectiveCommunications_

Range<CollectiveCommunicationEvent*> SubTrace::collectiveCommunications_
protected

Backing field for collective communications of this subtrace

Definition at line 86 of file SubTrace.hpp.

◆ communications_

Range<Communication*> SubTrace::communications_
protected

Backing field for communications of this subtrace

Definition at line 81 of file SubTrace.hpp.

◆ runtime_

otf2::chrono::duration SubTrace::runtime_ {}
protected

Backing field for the runtime of this subtrace

Definition at line 91 of file SubTrace.hpp.

◆ slots_

std::map<otf2::definition::location_group*, Range<Slot*>, LocationGroupCmp> SubTrace::slots_
protected

Backing field for the range of slots of this subtrace

Definition at line 76 of file SubTrace.hpp.

◆ startTime_

otf2::chrono::duration SubTrace::startTime_ {}
protected

Backing field for the start time of this subtrace

Definition at line 96 of file SubTrace.hpp.


The documentation for this class was generated from the following files: