mpirequests::Reset

This commit is contained in:
Joachim Schoeberl 2024-12-01 13:31:07 +01:00
parent ad5c50eef5
commit eead94dfc1

View File

@ -96,6 +96,8 @@ namespace ngcore
NgMPI_Requests() = default; NgMPI_Requests() = default;
~NgMPI_Requests() { WaitAll(); } ~NgMPI_Requests() { WaitAll(); }
void Reset() { requests.SetSize0(); }
NgMPI_Requests & operator+= (NgMPI_Request && r) NgMPI_Requests & operator+= (NgMPI_Request && r)
{ {
requests += NG_MPI_Request(std::move(r)); requests += NG_MPI_Request(std::move(r));
@ -539,6 +541,7 @@ namespace ngcore
public: public:
NgMPI_Requests & operator+= (NgMPI_Request &&) { return *this; } NgMPI_Requests & operator+= (NgMPI_Request &&) { return *this; }
NgMPI_Requests & operator+= (NG_MPI_Request r) { return *this; } NgMPI_Requests & operator+= (NG_MPI_Request r) { return *this; }
void Reset() { ; }
void WaitAll() { ; } void WaitAll() { ; }
int WaitAny() { return 0; } int WaitAny() { return 0; }
}; };