PRAgMaTIc
master
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
mpi_tools.h
Go to the documentation of this file.
1
/* Copyright (C) 2012 Imperial College London and others.
2
*
3
* Please see the AUTHORS file in the main source directory for a
4
* full list of copyright holders.
5
*
6
* Georgios Rokos
7
* Software Performance Optimisation Group
8
* Department of Computing
9
* Imperial College London
10
*
11
* Redistribution and use in source and binary forms, with or without
12
* modification, are permitted provided that the following conditions
13
* are met:
14
* 1. Redistributions of source code must retain the above copyright
15
* notice, this list of conditions and the following disclaimer.
16
* 2. Redistributions in binary form must reproduce the above
17
* copyright notice, this list of conditions and the following
18
* disclaimer in the documentation and/or other materials provided
19
* with the distribution.
20
*
21
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
22
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
23
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
24
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
26
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
27
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
28
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
30
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
31
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
32
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33
* SUCH DAMAGE.
34
*/
35
36
#ifndef MPI_TOOLS_H
37
#define MPI_TOOLS_H
38
39
#include <mpi.h>
40
41
// Template MPI data types.
42
// Method by Justin Holewinski: http://jholewinski.org/blog/the-beauty-of-c-templates/
43
44
template
<
typename
TYPE>
45
struct
mpi_type_wrapper
{
46
const
MPI_Datatype
mpi_type
;
47
mpi_type_wrapper
();
48
};
49
50
// Explicit instantiation for `char'
51
template
<>
mpi_type_wrapper<char>::mpi_type_wrapper
();
52
53
// Explicit instantiation for `float'
54
template
<>
mpi_type_wrapper<float>::mpi_type_wrapper
();
55
56
// Explicit instantiation for `double'
57
template
<>
mpi_type_wrapper<double>::mpi_type_wrapper
();
58
59
// Explicit instantiation for `short'
60
template
<>
mpi_type_wrapper<short>::mpi_type_wrapper
();
61
62
// Explicit instantiation for `int'
63
template
<>
mpi_type_wrapper<int>::mpi_type_wrapper
();
64
65
// Explicit instantiation for `long'
66
template
<>
mpi_type_wrapper<long>::mpi_type_wrapper
();
67
68
// Explicit instantiation for `unsigned long'
69
template
<>
mpi_type_wrapper<unsigned long>::mpi_type_wrapper
();
70
71
// Explicit instantiation for `long long'
72
template
<>
mpi_type_wrapper<long long>::mpi_type_wrapper
();
73
74
#endif
mpi_type_wrapper::mpi_type_wrapper
mpi_type_wrapper()
mpi_type_wrapper
Definition:
mpi_tools.h:45
mpi_type_wrapper::mpi_type
const MPI_Datatype mpi_type
Definition:
mpi_tools.h:46
Generated on Mon Feb 23 2015 22:50:44 for PRAgMaTIc by
1.8.7