MeDiPack  1.2.2
A Message Differentiation Package
SciComp TU Kaiserslautern
Loading...
Searching...
No Matches
inPlace.hpp
Go to the documentation of this file.
1/*
2 * MeDiPack, a Message Differentiation Package
3 *
4 * Copyright (C) 2015-2023 Chair for Scientific Computing (SciComp), University of Kaiserslautern-Landau
5 * Homepage: http://www.scicomp.uni-kl.de
6 * Contact: Prof. Nicolas R. Gauger (codi@scicomp.uni-kl.de)
7 *
8 * Lead developers: Max Sagebaum (SciComp, University of Kaiserslautern-Landau)
9 *
10 * This file is part of MeDiPack (http://www.scicomp.uni-kl.de/software/codi).
11 *
12 * MeDiPack is free software: you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation, either
15 * version 3 of the License, or (at your option) any later version.
16 *
17 * MeDiPack is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 *
21 * See the GNU Lesser General Public License for more details.
22 * You should have received a copy of the GNU
23 * Lesser General Public License along with MeDiPack.
24 * If not, see <http://www.gnu.org/licenses/>.
25 *
26 * Authors: Max Sagebaum, Tim Albring (SciComp, University of Kaiserslautern-Landau)
27 */
28
29#pragma once
30
31#include <mpi.h>
32
36namespace medi {
37
44
46
47 template<typename T>
48 operator const T*() const {
49 return reinterpret_cast<const T*>(MPI_IN_PLACE);
50 }
51
52 template<typename T>
53 operator T*() const {
54 return reinterpret_cast<T*>(MPI_IN_PLACE);
55 }
56
57 };
58
62 extern const AMPI_IN_PLACE_IMPL AMPI_IN_PLACE;
63}
Global namespace for MeDiPack - Message Differentiation Package.
Definition: adjointInterface.hpp:37
const AMPI_IN_PLACE_IMPL AMPI_IN_PLACE
This structure is able to be cast to any type.
Definition: ampi.cpp:40
Implementation of the MPI_IN_PLACE structure.
Definition: inPlace.hpp:43
AMPI_IN_PLACE_IMPL()
Definition: inPlace.hpp:45