KaMPIng 0.1.1
Flexible and (near) zero-overhead C++ bindings for MPI
Loading...
Searching...
No Matches
tuple.hpp
1// This file is part of KaMPIng.
2//
3// Copyright 2024 The KaMPIng Authors
4//
5// KaMPIng is free software : you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
6// License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
7// version. KaMPIng is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
8// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
9// for more details.
10//
11// You should have received a copy of the GNU Lesser General Public License along with KaMPIng. If not, see
12// <https://www.gnu.org/licenses/>.
13//
14#pragma once
15
16#include <tuple>
17
19
20namespace kamping {
21/// @brief Specialization of the `mpi_type_traits` type trait for `std::tuple`, which represents the tuple as MPI struct
22/// type.
23/// @note Using struct types may have performance pitfalls if the types has padding. For maximum performance, use the
24/// unsafe version in \ref kamping/types/unsafe/tuple.hpp.
25template <typename... Ts>
26struct mpi_type_traits<std::tuple<Ts...>, std::enable_if_t<(has_static_type_v<Ts> && ...)>>
27 : struct_type<std::tuple<Ts...>> {};
28} // namespace kamping
STL-compatible allocator for requesting memory using the builtin MPI allocator.
Definition allocator.hpp:32
Utility that maps C++ types to types that can be understood by MPI.
STL namespace.
The type trait that maps a C++ type T to a type trait that can be used to construct an MPI_Datatype.
Definition mpi_datatype.hpp:203
Constructs a MPI_Datatype for a struct-like type.
Definition mpi_datatype.hpp:96