QUDA
v1.1.0
A library for QCD on GPUs
|
#include <clover_field_order.h>
Public Member Functions | |
Accessor (const CloverField &A, bool inverse=false) | |
__device__ __host__ complex< Float > & | operator() (int parity, int x, int s_row, int s_col, int c_row, int c_col) const |
template<typename helper , typename reducer > | |
__host__ double | transform_reduce (QudaFieldLocation location, helper h, double i, reducer r) const |
Public Attributes | |
complex< Float > | dummy |
The internal ordering for each clover matrix has chirality as the slowest running dimension, with the internal 36 degrees of freedom stored as follows (s=spin, c = color) i | row | col | s c s c z 0 0 0 0 0 0 1 0 1 0 1 0 2 0 2 0 2 0 3 1 0 1 0 0 4 1 1 1 1 0 5 1 2 1 2 0 6 0 1 0 0 0 7 0 1 0 0 1 8 0 2 0 0 0 9 0 2 0 0 1 10 1 0 0 0 0 11 1 0 0 0 1 12 1 1 0 0 0 13 1 1 0 0 1 14 1 2 0 0 0 15 1 2 0 0 1 16 0 2 0 1 0 17 0 2 0 1 1 18 1 0 0 1 0 19 1 0 0 1 1 20 1 1 0 1 0 21 1 1 0 1 1 22 1 2 0 1 0 23 1 2 0 1 1 24 1 0 0 2 0 25 1 0 0 2 1 26 1 1 0 2 0 27 1 1 0 2 1 28 1 2 0 2 0 29 1 2 0 2 1 30 1 1 1 0 0 31 1 1 1 0 1 32 1 2 1 0 0 33 1 2 1 0 1 34 1 2 1 1 0 35 1 2 1 1 1 For each chirality the first 6 entires are the pure real diagonal entries. The following 30 entries correspond to the 15 complex numbers on the strictly lower triangular. E.g., N = 6 (2 spins x 3 colors) and # entries = 1/2 * N * (N-1) The storage order on the strictly lower triangular is column major, which complicates the indexing, since we have to count backwards from the end of the array.
psuedo code in lieu of implementation int row = s_row*3 + c_row; int col = s_col*3 + c_col; if (row == col) { return complex(a[row]) } else if (col < row) {
below we find the offset into each chiral half. First compute the offset into the strictly lower triangular part, counting from the lower right. This requires we change to prime coordinates. int row' = N - row; int col' = N - col;
The linear offset (in bottom-right coordinates) to the required element is simply 1/2*col'*(col'-1) + col - row. Subtract this offset from the number of elements: N=6, means 15 elements (14 with C-style indexing)), multiply by two to account for complexity and then add on number of real diagonals at the end
int k = 2 * ( (1/2 N*(N-1) -1) - (1/2 * col' * (col'-1) + col - row) + N; return complex(a[2*k], a[2*k+1]); } else { conj(swap(col,row)); }
Definition at line 168 of file clover_field_order.h.
|
inline |
Definition at line 170 of file clover_field_order.h.
|
inline |
Definition at line 174 of file clover_field_order.h.
|
inline |
Definition at line 180 of file clover_field_order.h.
|
mutable |
Definition at line 169 of file clover_field_order.h.