18#include "CollectiveCommunicationEvent.hpp"
23 otf2::definition::location *location,
24 types::communicator *communicator,
25 otf2::collective_type operation, uint32_t root) :
26 location(location), members(std::move(members)), communicator(communicator), operation(operation),
28 auto starting = std::min_element(this->members.begin(), this->members.end(), [](
const Member* lhs,
const Member* rhs) {return lhs->start < rhs->start;});
29 auto ending = std::max_element(this->members.begin(), this->members.end(), [](
const Member* lhs,
const Member* rhs) {return lhs->end < rhs->end;});
31 this->start = (*starting)->start;
32 this->end = (*ending)->end;
A class representing a member of a collective operation.
types::communicator * getCommunicator() const override
otf2::definition::location * getLocation() const override
Returns the location of the longest waiting member.
otf2::collective_type getOperation() const
Returns the kind of the collective operation.
uint32_t getRoot() const
Returns the root of the collective operation.
const std::vector< Member * > & getMembers() const
Returns all members participating in the collective operation.
otf2::chrono::duration getStartTime() const override
CommunicationKind getKind() const override
CollectiveCommunicationEvent(std::vector< Member * > members, otf2::definition::location *location, types::communicator *communicator, otf2::collective_type operation, uint32_t root)
Creates a new instance of the CollectiveCommunicationEvent class.
otf2::chrono::duration getEndTime() const override
Returns the end time of the collective operations.