18#include "Filetrace.hpp"
20#include "src/utils.hpp"
23 std::vector<Communication *> &communications,
24 std::vector<CollectiveCommunicationEvent *> &collectiveCommunications,
25 otf2::chrono::duration runtime) :
27 communications_(communications),
28 collectiveCommunications_(collectiveCommunications) {
32 slots_ = groupBy<Slot *, otf2::definition::location_group *, LocationGroupCmp>(
35 return new otf2::definition::location_group(s->
location->location_group());
38 auto groupL = l->
location->location_group();
39 auto groupR = r->location->location_group();
41 if (groupL.ref() == groupR.ref()) {
45 return groupL.ref() < groupR.ref();
54 return Range(communications_);
58 return Range(collectiveCommunications_);
61FileTrace::~FileTrace() {
62 for (
const auto &communication: this->collectiveCommunications_) {
66 for (
const auto &communication: this->communications_) {
70 for (
const auto &locationGroupSlotPair: this->
slots_) {
71 delete locationGroupSlotPair.first;
73 for (
const auto &slot: locationGroupSlotPair.second) {
std::map< otf2::definition::location_group *, Range< Slot * >, LocationGroupCmp > getSlots() const override
Returns a map of slots of the current trace.
Range< Communication * > getCommunications() override
Returns communication objects of the current trace.
FileTrace(std::vector< Slot * > &slotss, std::vector< Communication * > &communications, std::vector< CollectiveCommunicationEvent * > &collectiveCommunications, otf2::chrono::duration runtime)
Range< CollectiveCommunicationEvent * > getCollectiveCommunications() override
Returns collective communication events of the current trace.
A custom range implementation around std::vector<T>s.
A Slot represents a visual slot to be rendered in the UI. It contains the information of a location.
otf2::chrono::duration startTime
Start time of the slot relative to the trace start time.
otf2::definition::location * location
Location of the slot (thread) containing the location group (MPI rank)
std::map< otf2::definition::location_group *, Range< Slot * >, LocationGroupCmp > slots_
otf2::chrono::duration startTime_
otf2::chrono::duration runtime_
A comparator for otf2::definition::location_group objects.