10 #include "Tpetra_Details_DistributorActor.hpp"
12 namespace Tpetra::Details {
14 DistributorActor::DistributorActor()
15 : mpiTag_(DEFAULT_MPI_TAG) {}
17 DistributorActor::DistributorActor(
const DistributorActor& otherActor)
18 : mpiTag_(otherActor.mpiTag_),
19 requestsRecv_(otherActor.requestsRecv_),
20 requestsSend_(otherActor.requestsSend_) {}
22 void DistributorActor::doWaits(
const DistributorPlan& plan) {
27 void DistributorActor::doWaitsRecv(
const DistributorPlan& plan) {
28 if (requestsRecv_.size() > 0) {
29 ProfilingRegion wr(
"Tpetra::Distributor::doWaitsRecv");
31 Teuchos::waitAll(*plan.getComm(), requestsRecv_());
35 requestsRecv_.resize(0);
39 void DistributorActor::doWaitsSend(
const DistributorPlan& plan) {
40 if (requestsSend_.size() > 0) {
41 ProfilingRegion ws(
"Tpetra::Distributor::doWaitsSend");
43 Teuchos::waitAll(*plan.getComm(), requestsSend_());
47 requestsSend_.resize(0);
51 bool DistributorActor::isReady()
const {
53 for (
auto& request : requestsRecv_) {
54 result &= request->isReady();
56 for (
auto& request : requestsSend_) {
57 result &= request->isReady();