su2hmc
Loading...
Searching...
No Matches
coord.h
Go to the documentation of this file.
1
5#ifndef COORD
6#define COORD
7#ifdef __CUDACC__
8#include <cuda.h>
9#define USE_BLAS
10#include <cublas_v2.h>
11#endif
12#include <math.h>
13#if (defined__INTEL_COMPILER || __INTEL_LLVM_COMPILER)
14#include <mathimf.h>
15#endif
16#if defined __INTEL_MKL__
17#define USE_BLAS
18#include <mkl.h>
19#elif defined GSL_BLAS
20#define USE_BLAS
21#include <gsl/gsl_cblas.h>
22#elif defined AMD_BLAS
23#define USE_BLAS
24#include <cblas.h>
25#endif
26#include <sizes.h>
27#ifdef __CUDACC__
28__managed__
29#endif
31extern unsigned int *hu;
33extern unsigned int *hd;
35extern unsigned int *h1u;
37extern unsigned int *h1d;
39extern unsigned int *halosize;;
40#ifdef __cplusplus
41extern "C"
42{
43#endif
44 //Functions
45 //========
56 int Addrc(unsigned int *iu, unsigned int *id);
68 int ia(int x,int y,int z, int t);
79 int Check_addr(unsigned int *table, int lns, int lnt, int imin, int imax);
97 int Index2lcoord(int index, int *coord);
115 int Index2gcoord(int index, int *coord);
133 int Coord2lindex(int ix, int iy, int iz, int it);
151 int Coord2gindex(int ix, int iy, int iz, int it);
166 int Testlcoord(int cap);
183 int Testgcoord(int cap);
184#ifdef __cplusplus
185}
186#endif
187#endif
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:469
int Check_addr(unsigned int *table, int lns, int lnt, int imin, int imax)
Definition coord.c:334
int Addrc(unsigned int *iu, unsigned int *id)
Loads the addresses required during the update.
Definition coord.c:16
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:307
int Testlcoord(int cap)
Tests if the local coordinate transformation functions are working.
Definition coord.c:495
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:369
unsigned int * h1u
Up halo starting element.
Definition coord.c:15
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:406
unsigned int * h1d
Down halo starting element.
Definition coord.c:15
unsigned int * halosize
Array containing the size of the halo in each direction.
Definition coord.c:15
int Testgcoord(int cap)
This is completely new and missing from the original code.
Definition coord.c:537
unsigned int * hd
Down halo indices.
Definition coord.c:15
unsigned int * hu
Up halo indices.
Definition coord.c:15
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:443
Defines the constants of the code and other parameters for loop dimensions. Each subroutine includes ...