X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/85ba969329ba8ffcdd29e8adbfdb58047bfc80ee..107a968d8f427b1cbf6aa5a5cbc35e01c4daee6d:/src/instr/instr_private.hpp diff --git a/src/instr/instr_private.hpp b/src/instr/instr_private.hpp index be709da8f0..d2e367535c 100644 --- a/src/instr/instr_private.hpp +++ b/src/instr/instr_private.hpp @@ -61,12 +61,12 @@ public: // NoOpTI: init, finalize, test, wait, barrier explicit TIData(std::string name) : name_(name){}; - // CPuTI: compute, sleep (+ waitAny and waitAll out of laziness) + // CPuTI: compute, sleep (+ waitAny and waitall out of laziness) explicit TIData(std::string name, double amount) : name_(name), amount_(amount){}; // Pt2PtTI: send, isend, sssend, issend, recv, irecv explicit TIData(std::string name, int endpoint, int size, std::string datatype) : name_(name), endpoint(endpoint), send_size(size), send_type(datatype){}; - // CollTI: bcast, reduce, allReduce, gather, scatter, allGather, allToAll + // CollTI: bcast, reduce, allreduce, gather, scatter, allgather, allToAll explicit TIData(std::string name, int root, double amount, int send_size, int recv_size, std::string send_type, std::string recv_type) : name_(name) @@ -76,7 +76,7 @@ public: , recv_size(recv_size) , send_type(send_type) , recv_type(recv_type){}; - // VarCollTI: gatherV, scatterV, allGatherV, allToAllV (+ reduceScatter out of laziness) + // VarCollTI: gatherv, scatterv, allgatherv, allToAllV (+ reducescatter out of laziness) explicit TIData(std::string name, int root, int send_size, std::vector* sendcounts, int recv_size, std::vector* recvcounts, std::string send_type, std::string recv_type) : TIData(name, root, send_size, std::shared_ptr>(sendcounts), recv_size, @@ -196,6 +196,29 @@ public: } std::string display_size() override { return std::to_string(send_size > 0 ? send_size : recv_size); } }; + +/** + * If we want to wait for a request of asynchronous communication, we need to be able + * to identify this request. We do this by searching for a request identified by (src, dest, tag). + */ +class WaitTIData : public TIData { + int src; + int dest; + int tag; + +public: + explicit WaitTIData(int src, int dest, int tag) : TIData("wait"), src(src), dest(dest), tag(tag){}; + + std::string print() override + { + std::stringstream stream; + stream << getName() << " " << src << " " << dest << " " << tag; + + return stream.str(); + } + + std::string display_size() override { return ""; } +}; } }