Grid 0.7.0
Cshift.h
Go to the documentation of this file.
1/*************************************************************************************
2
3 Grid physics library, www.github.com/paboyle/Grid
4
5 Source file: ./lib/Cshift.h
6
7 Copyright (C) 2015
8
9Author: Peter Boyle <paboyle@ph.ed.ac.uk>
10
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License along
22 with this program; if not, write to the Free Software Foundation, Inc.,
23 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24
25 See the full license in the file "LICENSE" in the top level distribution directory
26*************************************************************************************/
27/* END LEGAL */
28#ifndef _GRID_CSHIFT_H_
29#define _GRID_CSHIFT_H_
30
32
33#ifdef GRID_COMMS_NONE
35#endif
36
37#ifdef GRID_COMMS_MPI
39#endif
40
41#ifdef GRID_COMMS_MPI3
43#endif
44
45#ifdef GRID_COMMS_MPIT
47#endif
48
49#ifdef GRID_COMMS_SHMEM
50#include <Grid/cshift/Cshift_mpi.h> // uses same implementation of communicator
51#endif
52
54template<class Expression,typename std::enable_if<is_lattice_expr<Expression>::value,void>::type * = nullptr>
55auto Cshift(const Expression &expr,int dim,int shift) -> decltype(closure(expr))
56{
57 return Cshift(closure(expr),dim,shift);
58}
60
61#endif
auto Cshift(const Expression &expr, int dim, int shift) -> decltype(closure(expr))
Definition Cshift.h:55
auto closure(const LatticeUnaryExpression< Op, T1 > &expr) -> Lattice< typename std::remove_const< decltype(expr.op.func(vecEval(0, expr.arg1)))>::type >
Definition Lattice_ET.h:492
#define NAMESPACE_BEGIN(A)
Definition Namespace.h:35
#define NAMESPACE_END(A)
Definition Namespace.h:36