su2hmc
Loading...
Searching...
No Matches
coord.h
Go to the documentation of this file.
1
8#ifndef COORD
9#define COORD
10#ifdef __CUDACC__
11#include <cuda.h>
12#define USE_BLAS
13#include <cublas_v2.h>
14#endif
15#include <math.h>
16#if (defined__INTEL_COMPILER || __INTEL_LLVM_COMPILER)
17#include <mathimf.h>
18#endif
19#if defined __USE_MKL__
20#define USE_BLAS
21#include <mkl.h>
22#elif defined GSL_BLAS
23#define USE_BLAS
24#include <gsl/gsl_cblas.h>
25#elif defined AMD_BLAS
26#define USE_BLAS
27#include <cblas.h>
28#endif
29#include <sizes.h>
30#ifdef __CUDACC__
31__managed__
32#endif
34extern unsigned int h1u[ndim];
36extern unsigned int h1d[ndim];
38extern unsigned int *hu;
40extern unsigned int *hd;
42extern unsigned int halosize[ndim];
43#ifdef __cplusplus
44extern "C"
45{
46#endif
47 //Functions
48 //========
60 int Addrc(unsigned int *iu, unsigned int *id);
73 int ia(int x,int y,int z, int t);
86 int Check_addr(unsigned int *table, int lns, int lnt, int imin, int imax);
105 int Index2lcoord(int index, int *coord);
124 int Index2gcoord(int index, int *coord);
141 int Coord2lindex(int ix, int iy, int iz, int it);
158 int Coord2gindex(int ix, int iy, int iz, int it);
174 int Testlcoord(int cap);
192 int Testgcoord(int cap);
193#ifdef __cplusplus
194}
195#endif
196#endif
unsigned int halosize[ndim]
Array containing the size of the halo in each direction.
Definition coord.c:12
unsigned int * hd
Down halo indices.
Definition coord.c:11
unsigned int * hu
Up halo indices.
Definition coord.c:11
unsigned int h1d[ndim]
Down halo starting element.
Definition coord.c:12
unsigned int h1u[ndim]
Up halo starting element.
Definition coord.c:12
int Coord2gindex(int ix, int iy, int iz, int it)
Converts the coordinates of a global lattice point to its index in the computer memory.
Definition coord.c:365
int Check_addr(unsigned int *table, int lns, int lnt, int imin, int imax)
Checks that the addresses are within bounds before an update.
Definition coord.c:305
int Addrc(unsigned int *iu, unsigned int *id)
Loads the addresses required during the update.
Definition coord.c:13
int ia(int x, int y, int z, int t)
Described as a 21st Century address calculator, it gets the memory address of an array entry.
Definition coord.c:293
int Testlcoord(int cap)
Tests if the local coordinate transformation functions are working.
Definition coord.c:374
int Index2lcoord(int index, int *coord)
Converts the index of a point in memory to the equivalent point in the 4 dimensional array,...
Definition coord.c:326
int Index2gcoord(int index, int *coord)
Converts the index of a point in memory to the equivalent point in the 4 dimensional array,...
Definition coord.c:341
int Testgcoord(int cap)
This is completely new and missing from the original code.
Definition coord.c:396
int Coord2lindex(int ix, int iy, int iz, int it)
Converts the coordinates of a local lattice point to its index in the computer memory.
Definition coord.c:356
Defines the constants of the code and other parameters for loop dimensions. Each subroutine includes ...
#define ndim
Dimensions.
Definition sizes.h:188