|
Tpetra parallel linear algebra
Version of the Day
|
Declaration of Tpetra::Details::iallreduce. More...
#include "TpetraCore_config.h"#include "Teuchos_EReductionType.hpp"#include "Kokkos_Core.hpp"#include <memory>#include <stdexcept>#include <type_traits>#include <functional>Go to the source code of this file.
Namespaces | |
| Tpetra | |
| Namespace Tpetra contains the class and methods constituting the Tpetra library. | |
| Tpetra::Details | |
| Namespace for Tpetra implementation details. | |
Functions | |
| std::shared_ptr< CommRequest > | Tpetra::Details::Impl::emptyCommRequest () |
| Return an "empty" comm request (waiting on it does nothing). More... | |
| template<class PacketType , class SendLayoutType , class SendDeviceType , class RecvLayoutType , class RecvDeviceType > | |
| std::shared_ptr< CommRequest > | Tpetra::Details::Impl::wrapIallreduceCommRequest (const std::shared_ptr< CommRequest > &req, const ::Kokkos::View< const PacketType *, SendLayoutType, SendDeviceType > &sendbuf, const ::Kokkos::View< PacketType *, RecvLayoutType, RecvDeviceType > &recvbuf) |
| Function for wrapping the CommRequest to be returned from Tpetra::Details::iallreduce; overload for rank-1 send and receive buffers. More... | |
| template<class PacketType , class SendLayoutType , class SendDeviceType , class RecvLayoutType , class RecvDeviceType > | |
| std::shared_ptr< CommRequest > | Tpetra::Details::Impl::wrapIallreduceCommRequest (const std::shared_ptr< CommRequest > &req, const ::Kokkos::View< const PacketType, SendLayoutType, SendDeviceType > &sendbuf, const ::Kokkos::View< PacketType, RecvLayoutType, RecvDeviceType > &recvbuf) |
| Function for wrapping the CommRequest to be returned from Tpetra::Details::iallreduce; overload for rank-0 send and receive buffers. More... | |
| template<class Packet > | |
| std::shared_ptr< CommRequest > | Tpetra::Details::Impl::iallreduceRaw (const Packet sendbuf[], Packet recvbuf[], const int count, const ::Teuchos::EReductionType op, const ::Teuchos::Comm< int > &comm) |
| Second lowest-level implementation of Tpetra::Details::iallreduce (see bottom of this header file). More... | |
| template<class InputViewType , class OutputViewType > | |
| std::shared_ptr< CommRequest > | Tpetra::Details::iallreduce (const InputViewType &sendbuf, const OutputViewType &recvbuf, const ::Teuchos::EReductionType op, const ::Teuchos::Comm< int > &comm) |
| Nonblocking all-reduce, for either rank-1 or rank-0 Kokkos::View objects. More... | |
Declaration of Tpetra::Details::iallreduce.
Tpetra::Details::iallreduce wraps MPI_Iallreduce. That is the only thing in this file upon which Tpetra developers should rely. Tpetra developers should not rely on anything else in this file. Users may not rely on anything in this file!
If you want to find the only thing in this file that you are supposed to use, search for "SKIP DOWN TO HERE" (no quotes). "You" only refers to Tpetra developers. Users, this file is not for you!
Definition in file Tpetra_Details_iallreduce.hpp.
| std::shared_ptr< CommRequest > Tpetra::Details::Impl::emptyCommRequest | ( | ) |
Return an "empty" comm request (waiting on it does nothing).
Definition at line 171 of file Tpetra_Details_iallreduce.cpp.
| std::shared_ptr<CommRequest> Tpetra::Details::Impl::wrapIallreduceCommRequest | ( | const std::shared_ptr< CommRequest > & | req, |
| const ::Kokkos::View< const PacketType *, SendLayoutType, SendDeviceType > & | sendbuf, | ||
| const ::Kokkos::View< PacketType *, RecvLayoutType, RecvDeviceType > & | recvbuf | ||
| ) |
Function for wrapping the CommRequest to be returned from Tpetra::Details::iallreduce; overload for rank-1 send and receive buffers.
The object returned from this function keeps the send and receive buffers. Since ::Kokkos::View reference-counts, this ensures that the buffers will not be deallocated until the iallreduce completes. The buffer references get cleared on wait() or cancel().
| req | [in] Pointer to CommRequest from Tpetra::Details::iallreduce. |
| sendbuf | [in] Send buffer for Tpetra::Details::iallreduce. |
| recvbuf | [in] Receive buffer for Tpetra::Details::iallreduce. This is an input argument, because this function itself does not modify the contents of the receive buffer; it just keeps a reference to it. |
| PacketType | Type of each entry of the send and receive buffers. |
| SendLayoutType | array_layout of the send buffer. Must be Kokkos::LayoutLeft or Kokkos::LayoutRight. |
| SendDeviceType | Kokkos::Device specialization used by the send buffer. |
| RecvLayoutType | array_layout of the receive buffer. Must be Kokkos::LayoutLeft or Kokkos::LayoutRight. |
| RecvDeviceType | Kokkos::Device specialization used by the receive buffer. It's OK for this to differ from SendDeviceType. We assume that MPI implementations can handle this. (This is a reasonable assumption with CUDA-enabled MPI implementations.) |
Definition at line 482 of file Tpetra_Details_iallreduce.hpp.
| std::shared_ptr<CommRequest> Tpetra::Details::Impl::wrapIallreduceCommRequest | ( | const std::shared_ptr< CommRequest > & | req, |
| const ::Kokkos::View< const PacketType, SendLayoutType, SendDeviceType > & | sendbuf, | ||
| const ::Kokkos::View< PacketType, RecvLayoutType, RecvDeviceType > & | recvbuf | ||
| ) |
Function for wrapping the CommRequest to be returned from Tpetra::Details::iallreduce; overload for rank-0 send and receive buffers.
The object returned from this function keeps the send and receive buffers. Since ::Kokkos::View reference-counts, this ensures that the buffers will not be deallocated until the iallreduce completes. The buffer references get cleared on wait() or cancel().
| req | [in] Pointer to CommRequest from Tpetra::Details::iallreduce. |
| sendbuf | [in] Send buffer for Tpetra::Details::iallreduce. |
| recvbuf | [in] Receive buffer for Tpetra::Details::iallreduce. This is an input argument, because this function itself does not modify the contents of the receive buffer; it just keeps a reference to it. |
| PacketType | Type of each entry of the send and receive buffers. |
| SendLayoutType | array_layout of the send buffer. Must be Kokkos::LayoutLeft or Kokkos::LayoutRight. |
| SendDeviceType | Kokkos::Device specialization used by the send buffer. |
| RecvLayoutType | array_layout of the receive buffer. Must be Kokkos::LayoutLeft or Kokkos::LayoutRight. |
| RecvDeviceType | Kokkos::Device specialization used by the receive buffer. It's OK for this to differ from SendDeviceType. We assume that MPI implementations can handle this. (This is a reasonable assumption with CUDA-enabled MPI implementations.) |
Definition at line 541 of file Tpetra_Details_iallreduce.hpp.
| std::shared_ptr<CommRequest> Tpetra::Details::Impl::iallreduceRaw | ( | const Packet | sendbuf[], |
| Packet | recvbuf[], | ||
| const int | count, | ||
| const ::Teuchos::EReductionType | op, | ||
| const ::Teuchos::Comm< int > & | comm | ||
| ) |
Second lowest-level implementation of Tpetra::Details::iallreduce (see bottom of this header file).
| Packet | Type of each entry of the send and receive buffer. |
This doesn't need to know about the Kokkos "Device" type, because we assume that MPI implementations can read CUDA device memory, host memory, or indeed from any memory space.
Definition at line 595 of file Tpetra_Details_iallreduce.hpp.
1.8.13