QMCPACK
CommOperatorsSingle.h
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 //
7 // File developed by: Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
8 // Ken Esler, kpesler@gmail.com, University of Illinois at Urbana-Champaign
9 // Jeremy McMinnis, jmcminis@gmail.com, University of Illinois at Urbana-Champaign
10 //
11 // File created by: Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
12 //////////////////////////////////////////////////////////////////////////////////////
13 
14 
15 #ifndef OHMMS_COMMUNICATION_OPERATORS_SINGLE_H
16 #define OHMMS_COMMUNICATION_OPERATORS_SINGLE_H
17 
18 ///dummy declarations to be specialized
19 template<typename T>
20 inline void gsum(T&, int)
21 {}
22 
23 template<typename T>
24 inline void Communicate::allreduce(T&)
25 {}
26 
27 template<typename T>
28 inline void Communicate::reduce(T&)
29 {}
30 
31 template<typename T>
32 inline void Communicate::reduce(T* restrict, T* restrict, int n)
33 {}
34 
35 template<typename T>
36 inline void Communicate::reduce_in_place(T* restrict, int n)
37 {}
38 
39 template<typename T>
40 inline void Communicate::bcast(T&)
41 {}
42 
43 template<typename T>
44 inline void Communicate::bcast(T* restrict, int n)
45 {}
46 
47 template<typename T>
48 inline Communicate::request Communicate::irecv(int source, int tag, T&)
49 {
50  return 1;
51 }
52 
53 template<typename T>
54 inline void Communicate::send(int dest, int tag, T&)
55 {}
56 
57 template<typename T>
58 inline void Communicate::gather(T& sb, T& rb, int dest)
59 {}
60 
61 template<typename T>
62 inline void Communicate::allgather(T& sb, T& rb, int count)
63 {
64  for (size_t i = 0; i < count; i++)
65  rb[i] = sb[i];
66 }
67 
68 template<typename T>
69 inline void Communicate::scatter(T& sb, T& rb, int dest)
70 {}
71 
72 template<typename T>
73 inline Communicate::request Communicate::isend(int dest, int tag, T&)
74 {
75  return 1;
76 }
77 
78 template<typename T>
79 inline Communicate::request Communicate::irecv(int source, int tag, T*, int n)
80 {
81  return 1;
82 }
83 
84 template<typename T>
85 inline Communicate::request Communicate::isend(int dest, int tag, T*, int n)
86 {
87  return 1;
88 }
89 
90 template<typename T, typename IT>
91 inline void Communicate::gatherv(T& sb, T& rb, IT&, IT&, int dest)
92 {}
93 
94 template<typename T, typename IT>
95 inline void Communicate::scatterv(T& sb, T& rb, IT&, IT&, int source)
96 {}
97 
98 template<typename T, typename IT>
99 void gatherv(T* sb, T* rb, int n, IT& counts, IT& displ, int dest)
100 {}
101 
102 template<typename T, typename TMPI, typename IT>
103 inline void Communicate::gatherv_in_place(T* buf, TMPI& datatype, IT& counts, IT& displ, int dest)
104 {}
105 
106 template<typename T>
107 void allgather(T* sb, T* rb, int count)
108 {}
109 
110 template<typename T>
111 void gsum(T&)
112 {}
113 
114 #endif
request isend(int dest, int tag, T &)
request irecv(int source, int tag, T &)
void reduce(T &)
void send(int dest, int tag, T &)
void gatherv(T &sb, T &rb, IT &counts, IT &displ, int dest=0)
void allreduce(T &)
void allgather(T &sb, T &rb, int count)
void gather(T &sb, T &rb, int dest=0)
void gatherv_in_place(T *buf, TMPI &datatype, IT &counts, IT &displ, int dest=0)
void scatter(T &sb, T &rb, int dest=0)
void reduce_in_place(T *restrict, int n)
void gsum(T &, int)
dummy declarations to be specialized
void bcast(T &)
void allgather(T *sb, T *rb, int count)
void gatherv(T *sb, T *rb, int n, IT &counts, IT &displ, int dest)
void scatterv(T &sb, T &rb, IT &counts, IT &displ, int source=0)