18#include "InformationDockCollectiveCommunicationStrategy.hpp"
19#include "src/utils.hpp"
23 communicatorField =
new QLabel;
24 operationField =
new QLabel;
25 rootField =
new QLabel;
27 layout->addRow(
tr(
"Communicator:"), communicatorField);
28 layout->addRow(
tr(
"Operation:"), operationField);
29 layout->addRow(
tr(
"Root:"), rootField);
35 auto communicator = std::get<otf2::definition::comm>(*element->
getCommunicator());
37 auto collectiveRoot =
static_cast<otf2::collective_root_type
>(element->
getRoot());
39 QString rootName =
"Unknown";
40 switch(collectiveRoot) {
41 case otf2::common::collective_root_type::none:
44 case otf2::common::collective_root_type::self:
47 case otf2::common::collective_root_type::this_group:
48 rootName =
"This Group";
51 if(holds_alternative<otf2::definition::comm_group>(communicator.group())) {
52 auto group = get<otf2::definition::comm_group>(communicator.group());
53 auto root = group[element->
getRoot()];
55 rootName = QString::fromStdString(root.name().str());
60 auto operationName = QString::fromStdString(collectiveCommunicationOperationName(element->
getOperation()));
61 auto communicatorName = QString::fromStdString(communicator.name().str());
63 rootField->setText(rootName);
64 operationField->setText(operationName);
65 communicatorField->setText(communicatorName);
71 return tr(
"Collective communication").toStdString();
A class representing an MPI collective operation.
types::communicator * getCommunicator() const override
otf2::collective_type getOperation() const
Returns the kind of the collective operation.
uint32_t getRoot() const
Returns the root of the collective operation.