Functions | |
| int | Addrc (unsigned int *iu, unsigned int *id) |
| Loads the addresses required during the update. | |
| 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. | |
| int | Check_addr (unsigned int *table, int lns, int lnt, int imin, int imax) |
| Checks that the addresses are within bounds before an update. | |
| int | Index2lcoord (int index, int *coord) |
| Converts the index of a point in memory to the equivalent point in the 4 dimensional array, where the time index is the last coordinate in the array. | |
| int | Index2gcoord (int index, int *coord) |
| Converts the index of a point in memory to the equivalent point in the 4 dimensional array, where the time index is the last coordinate in the array. | |
| 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. | |
| 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. | |
| int | Testlcoord (int cap) |
| Tests if the local coordinate transformation functions are working. | |
| int | Testgcoord (int cap) |
| This is completely new and missing from the original code. | |
| int Addrc | ( | unsigned int * | iu, |
| unsigned int * | id ) |
Loads the addresses required during the update.
| [out] | iu | Upper halo indices |
| [out] | id | Lower halo indices |
In original AOS code halo was stored after the sublattice
Definition at line 13 of file coord.c.
References AVX, h1d, h1u, halo, HALOLIM, halosize, halot, halox, haloy, haloz, hd, hu, ia(), ksize, ksizet, ksizex, ksizey, ksizez, kvol, ndim, and nproc.
| int Check_addr | ( | unsigned int * | table, |
| int | lns, | ||
| int | lnt, | ||
| int | imin, | ||
| int | imax ) |
Checks that the addresses are within bounds before an update.
| [in] | table | Pointer to the table in question |
| [in] | lns | Size of each spacial dimension |
| [in] | lnt | Size of the time dimension |
| [in] | imin | Lower bound for element of the table |
| [in] | imax | Upper bound for an element of the table |
Definition at line 305 of file coord.c.
References BOUNDERROR, and ndim.
|
inline |
Converts the coordinates of a global lattice point to its index in the computer memory.
This is a rather nuanced function, as C and Fortran are rather different in how they store arrays. C starts with index 0 and Fortran (by default) starts with index 1
Also C and Fortran store data in the opposite memory order so be careful when calling this function!
| [in] | ix,iy,iz,it | Index in each direction |
Definition at line 365 of file coord.c.
|
inline |
Converts the coordinates of a local lattice point to its index in the computer memory.
This is a rather nuanced function, as C and Fortran are rather different in how they store arrays. C starts with index 0 and Fortran (by default) starts with index 1
Also C and Fortran store data in the opposite memory order so be careful when calling this function!
| [in] | ix,iy,iz,it | Index in each direction |
Definition at line 356 of file coord.c.
|
inline |
Described as a 21st Century address calculator, it gets the memory address of an array entry.
| [in] | x,y,z,t | The coordinates |
Definition at line 293 of file coord.c.
References ksizet, ksizex, ksizey, and ksizez.
|
inline |
Converts the index of a point in memory to the equivalent point in the 4 dimensional array, where the time index is the last coordinate in the array.
This is a rather nuanced function, as C and Fortran are rather different in how they store arrays. C starts with index 0 and Fortran (by default) starts with index 1
Also C and Fortran store data in the opposite memory order so be careful when calling this function!
| [in] | index | The index of the point as stored linearly in computer memory |
| [out] | coord | The 4-array for the coordinates. The first three spots are for the time index. |
Definition at line 341 of file coord.c.
|
inline |
Converts the index of a point in memory to the equivalent point in the 4 dimensional array, where the time index is the last coordinate in the array.
This is a rather nuanced function, as C and Fortran are rather different in how they store arrays. C starts with index 0 and Fortran (by default) starts with index 1
Also C and Fortran store data in the opposite memory order so be careful when calling this function!
| [in] | index | The index of the point as stored linearly in computer memory |
| [out] | coord | The 4-array for the coordinates. The first three spots are for the time index. |
Definition at line 326 of file coord.c.
References ksizet, ksizey, and ksizez.
| int Testgcoord | ( | int | cap | ) |
This is completely new and missing from the original code.
We test the coordinate conversion functions by doing the following
The code is basically the same as the previous function with different magic numbers.
| [in] | cap | The max value the index can take on. Should be the size of our array |
Definition at line 396 of file coord.c.
References Index2gcoord(), and INDTOCOORD.
| int Testlcoord | ( | int | cap | ) |
Tests if the local coordinate transformation functions are working.
Going to expand a little on the original here and do the following
| [in] | cap | The max value the index can take on. Should be the size of the array |
Definition at line 374 of file coord.c.
References Index2lcoord(), and INDTOCOORD.