Topics | |
| Clover Force | |
| Clover Multiplication routines | |
Functions | |
| void | ByGenLeft (Complex_f a[nc], const unsigned short gen) |
| Multiply leaf (or part of one) by generator from left. | |
| void | ByGenRight (Complex_f a[nc], const unsigned short gen) |
| Multiply leaf (or part of one) by generator from right. | |
| void | Clover_SU2plaq (Complex_f *ut[nc], Complex_f Leaves[nc], unsigned int *iu, int i, int mu, int nu) |
| Calculates the SU2 plaquette at site i in the \(\mu--\nu\) direction. | |
| void | Half_Leaves (Complex_f *hLeaves[2], Complex_f *ut[2], unsigned int *iu, unsigned int *id, const unsigned short mu, const unsigned short nu) |
| Calculates the products of the first two links in a plaquette. | |
| void | Leaf (Complex_f Leaves[nc], Complex_f *ut[nc], unsigned int *iu, unsigned int *id, unsigned int i, const unsigned short mu, const unsigned short nu, const unsigned short leaf) |
| Calculates a leaf for a clover term. | |
| void | Clover (Complex_f *clover[2], Complex_f *ut[2], unsigned int *iu, unsigned int *id) |
| Calculates the clovers in all directions at all sites. | |
| int | Init_clover (Complex **sigval, Complex_f **sigval_f, unsigned short **sigin, float c_sw) |
| Initialise values needed for the clover terms. | |
| void | Clover_free (Complex_f *clover[nc]) |
| Free's memory used for clover terms and leaves. | |
| int | cuClover (Complex_f *clover[nc], Complex_f *ut[nc], unsigned int *iu, unsigned int *id) |
| CUDA wrapper for calculating the clovers in all directions at all sites \( F_{\mu\nu}(n)=\frac{-i}{8a^2}\left(Q_{\mu\nu}(n)-Q_{\nu\mu}(n)\right)\). | |
| void | Half_Leaf (Complex_f Leaves[nc], Complex_f *ut[nc], Complex_f a[nc], unsigned int *iu, unsigned int *id, const unsigned int i, const unsigned short mu, const unsigned short nu, const unsigned short leaf) |
| Calculates the first half of the leaf for a clover term. We split it so that the force term can reuse the first half of the leaf. | |
| template<typename T> | |
| __device__ void | Device::Half_Leaf (complex< T > Leaves[nc], complex< T > *u11t, complex< T > *u12t, complex< T > a[nc], unsigned int *iu, unsigned int *id, const unsigned int i, const unsigned short mu, const unsigned short nu, const unsigned short leaf) |
| Calculates the first half of the leaf for a clover term. We split it so that the force term can reuse the first half of the leaf. | |
| template<typename T> | |
| __device__ void | Device::Leaf (complex< T > *u11t, complex< T > *u12t, complex< T > Leaves[nc], unsigned int *iu, unsigned int *id, unsigned int i, const unsigned short mu, const unsigned short nu, const unsigned short leaf) |
| Calculates a leaf for a clover term. | |
| template<typename T> | |
| __global__ void | Kernels::Half_Leaves (complex< T > *hLeaves0, complex< T > *hLeaves1, complex< T > *u11t, complex< T > *u12t, unsigned int *iu, unsigned int *id, const unsigned short mu, const unsigned short nu) |
| Calculates the products of the first two links in a plaquette. | |
| template<typename T> | |
| __global__ void | Kernels::Full_Clover (complex< T > *clover1, complex< T > *clover2, complex< T > *u11t, complex< T > *u12t, unsigned int *iu, unsigned int *id, int mu, int nu) |
| Calculates the clovers in all directions at all sites \( F_{\mu\nu}(n)=\frac{-i}{8a^2}\left(Q_{\mu\nu}(n)-Q_{\nu\mu}(n)\right)\). | |
| void ByGenLeft | ( | Complex_f | a[nc], |
| const unsigned short | gen ) |
Multiply leaf (or part of one) by generator from left.
The leaves contributing to each force term need to be scaled by the generator, but the generator appears at different points in each leaf. This routine multiples by the generator from the left side.
| [in,out] | a | The leaf or partial leaf |
| [in] | gen | What generator are we multiplying by? |
a \(i\sigma_x\)
\(i\sigma_y\)
\(i\sigma_z\)
Definition at line 9 of file clover.c.
References Complex_f, I, and nc.
| void ByGenRight | ( | Complex_f | a[nc], |
| const unsigned short | gen ) |
Multiply leaf (or part of one) by generator from right.
The leaves contributing to each force term need to be scaled by the generator, but the generator appears at different points in each leaf. This routine multiples by the generator from the right side.
| [in,out] | a | The leaf or partial leaf |
| [in] | gen | What generator are we multiplying by? |
a \(i\sigma_x\)
\(i\sigma_y\)
\(i\sigma_z\)
Definition at line 31 of file clover.c.
Calculates the clovers in all directions at all sites.
\[ F_{\mu\nu}(n)=\frac{-i}{8a^2}\left(Q_{\mu\nu}(n)-Q_{\nu\mu}(n)\right)\]
| [out] | clover | Array of clovers |
| [in] | ut | Gauge fields |
| [in] | iu,id | Upper and lower indices |
clover Definition at line 203 of file clover.c.
References AVX, Complex_f, cuClover(), I, kvol, Leaf(), nc, and ndim.
|
inline |
Free's memory used for clover terms and leaves.
| [in,out] | clover | Clovers |
clover memory freed Definition at line 750 of file clover.c.
References Complex_f, nc, and streams.
| void Clover_SU2plaq | ( | Complex_f * | ut[nc], |
| Complex_f | Leaves[nc], | ||
| unsigned int * | iu, | ||
| int | i, | ||
| int | mu, | ||
| int | nu ) |
Calculates the SU2 plaquette at site i in the \(\mu--\nu\) direction.
| [in] | ut | Trial fields |
| [out] | Leaves | Trial fields |
| [in] | iu | Upper halo indices |
| [in] | i | site index |
| [in] | mu,nu | Plaquette direction. Note that mu and nu can be negative to facilitate calculating plaquettes for Clover terms. No sanity checks are conducted on them in this routine. |
CUDA wrapper for calculating the clovers in all directions at all sites \( F_{\mu\nu}(n)=\frac{-i}{8a^2}\left(Q_{\mu\nu}(n)-Q_{\nu\mu}(n)\right)\).
| [out] | clover | Array of clovers |
| [in] | ut | Gauge fields |
| [in] | iu,id | Upper and lower indices |
clover Definition at line 694 of file cuclover.cu.
References Complex_f, cudaDeviceSynchronise, Kernels::Full_Clover(), kvol, nc, ndim, and streams.
| __global__ void Kernels::Full_Clover | ( | complex< T > * | clover1, |
| complex< T > * | clover2, | ||
| complex< T > * | u11t, | ||
| complex< T > * | u12t, | ||
| unsigned int * | iu, | ||
| unsigned int * | id, | ||
| int | mu, | ||
| int | nu ) |
Calculates the clovers in all directions at all sites \( F_{\mu\nu}(n)=\frac{-i}{8a^2}\left(Q_{\mu\nu}(n)-Q_{\nu\mu}(n)\right)\).
| [out] | clover1,clover2 | Array of clovers |
| [in] | u11t,u12t | Gauge fields |
| [in] | iu,id | Upper and lower indices |
| [in] | mu,nu | Clover direction |
clover1 and clover2 overwritten The clover is given by \(F_{\mu\nu}=\frac{-i}{8}\left(Q_{\mu\nu}-Q_{\nu\mu}\right)\). We do that manually below.
The \(\alpha\) component. Only the imaginary part survives. And since it is multiplied by \(-i\) it is real. Need to be extra cautious here though .imag() returns a real value. So we multiply by I_f manually The 8.0f becomes a 4.0f to account for the factor of two
The \(\beta\) component. Both real and imaginary components survive. It ends up getting doubled.
Definition at line 323 of file cuclover.cu.
References I_f, kvol, Device::Leaf(), and ndim.
| __device__ void Device::Half_Leaf | ( | complex< T > | Leaves[nc], |
| complex< T > * | u11t, | ||
| complex< T > * | u12t, | ||
| complex< T > | a[nc], | ||
| unsigned int * | iu, | ||
| unsigned int * | id, | ||
| const unsigned int | i, | ||
| const unsigned short | mu, | ||
| const unsigned short | nu, | ||
| const unsigned short | leaf ) |
Calculates the first half of the leaf for a clover term. We split it so that the force term can reuse the first half of the leaf.
| [out] | Leaves | Leaf |
| [in] | u11t,u12t | Gauge fields |
| [in] | a | Buffer array |
| [in] | iu,id | Upper and lower site indices |
| [in] | i | Lattice index of the clover in question |
| [in] | mu,nu | Direction in which we're evaluating the leaf |
| [in] | leaf | Which leaf of the clover is being calculated |
Both positive is just a standard plaquette
\(U_\mu(x)U_\nu(x+\hat{\mu})\)
Leaf in the forward nu and backwards mu direction
\(U_\nu(x)U^\dagger_\mu(x-\hat{\mu}+\hat{\nu})\)
Leaf in the backwards nu and forwards mu direction
\(U^\dagger_\nu(x-\hat{\nu})U_\mu(x-\hat{\nu})\)
Leaf in the backwards mu and backwards nu direction
\(U_\mu^\dagger(x-\hat{\mu})U_\nu^\dagger(x-\hat{\mu}-\hat{\nu})\)
Definition at line 91 of file cuclover.cu.
References conj(), kvol, kvolHalo, and nc.
| void Half_Leaf | ( | Complex_f | Leaves[nc], |
| Complex_f * | ut[nc], | ||
| Complex_f | a[nc], | ||
| unsigned int * | iu, | ||
| unsigned int * | id, | ||
| const unsigned int | i, | ||
| const unsigned short | mu, | ||
| const unsigned short | nu, | ||
| const unsigned short | leaf ) |
Calculates the first half of the leaf for a clover term. We split it so that the force term can reuse the first half of the leaf.
| [out] | Leaves | Leaf |
| [in] | ut | Gauge fields |
| [in] | a | Buffer array |
| [in] | iu,id | Upper and lower site indices |
| [in] | i | Lattice index of the clover in question |
| [in] | mu,nu | Direction in which we're evaluating the leaf |
| [in] | leaf | Which leaf of the clover is being calculated |
Leaves replaced with output Both positive is just a standard plaquette
\(U_\mu(x)U_\nu(x+\hat{\mu})\)
Leaf in the forward nu and backwards mu direction
\(U_\nu(x)U^\dagger_\mu(x-\hat{\mu}+\hat{\nu})\)
Leaf in the backwards nu and forwards mu direction
\(U^\dagger_\nu(x-\hat{\nu})U_\mu(x-\hat{\nu})\)
Leaf in the backwards mu and backwards nu direction
\(U_\mu^\dagger(x-\hat{\mu})U_\nu^\dagger(x-\hat{\mu}-\hat{\nu})\)
Definition at line 70 of file clover.c.
References Complex_f, kvol, kvolHalo, and nc.
| void Half_Leaves | ( | Complex_f * | hLeaves[2], |
| Complex_f * | ut[2], | ||
| unsigned int * | iu, | ||
| unsigned int * | id, | ||
| const unsigned short | mu, | ||
| const unsigned short | nu ) |
Calculates the products of the first two links in a plaquette.
| [out] | hLeaves | Product of first two links |
| [in] | ut | Gauge fields |
| [in] | iu,id | Upper and lower indices |
| [in] | mu,nu | Clover direction |
hLeaves Definition at line 122 of file clover.c.
References Complex_f, Half_Leaf(), kvol, nc, and ndim.
| __global__ void Kernels::Half_Leaves | ( | complex< T > * | hLeaves0, |
| complex< T > * | hLeaves1, | ||
| complex< T > * | u11t, | ||
| complex< T > * | u12t, | ||
| unsigned int * | iu, | ||
| unsigned int * | id, | ||
| const unsigned short | mu, | ||
| const unsigned short | nu ) |
Calculates the products of the first two links in a plaquette.
| [out] | hLeaves0,hLeaves1 | Product of first two links |
| [in] | u11t,u12t | Gauge fields |
| [in] | iu,id | Upper and lower indices |
| [in] | mu,nu | Clover direction |
hLeaves0 and hLeaves1 overwritten Definition at line 294 of file cuclover.cu.
References Device::Half_Leaf(), kvol, nc, and ndim.
Initialise values needed for the clover terms.
| [out] | sigval,sigval_f | \( \sigma_{\mu\nu}=\frac{1}{2i}[\gamma_\mu,\gamma_\nu]\) in double and single precision scaled by \(c_{sw}\) |
| [out] | sigin | Which column does row idirac of \(\sigma_{\mu\nu}\) act on |
| [in] | c_sw | Clover coefficient |
sigval and sigval_f initialised with matrix entries. sigin initialised with index of non-zero entries Definition at line 705 of file clover.c.
References AVX, Complex, Complex_f, cuComplex_convert(), dimBlockOne, dimGridOne, and I.
| __device__ void Device::Leaf | ( | complex< T > * | u11t, |
| complex< T > * | u12t, | ||
| complex< T > | Leaves[nc], | ||
| unsigned int * | iu, | ||
| unsigned int * | id, | ||
| unsigned int | i, | ||
| const unsigned short | mu, | ||
| const unsigned short | nu, | ||
| const unsigned short | leaf ) |
Calculates a leaf for a clover term.
| [out] | Leaves | Array of leaves |
| [in] | u11t,u12t | Gauge fields |
| [in] | iu,id | Upper and lower site indices |
| [in] | i | Lattice index of the clover in question |
| [in] | mu,nu | Direction in which we're evaluating the leaf |
| [in] | leaf | Which leaf of the clover is being calculated |
\(U_\mu(x)U_\nu(x+\hat{\mu})U^\dagger_\mu(x+\hat{\nu})\)
\(U_\mu(x)U_\nu(x+\hat{\mu})U^\dagger_\mu(x+\hat{\nu})U^\dagger_\nu(x)\)
Leaf in the forwards nu and backwards nu direction
\(U_\nu(x)U^\dagger_\mu(x-\hat{\mu}+\hat{\nu})U^\dagger_\nu(x-\hat{\mu})\)
\(U_\nu(x)U^\dagger_\mu(x-\hat{\mu}+\hat{\nu})U^\dagger_\nu(x-\hat{\mu})U_\mu(x-\hat{\mu})\)
Leaf in the forwards mu and backwards nu direction
\(U^\dagger_\nu(x-\hat{\nu})U_\mu(x-\hat{\nu})U_\nu(x-\hat{\nu}+\hat{\mu})\)
\(U^\dagger_\nu(x-\hat{\nu})U_\mu(x-\hat{\nu})U_\nu(x-\hat{\nu}+\hat{\mu})U^\dagger_\mu(x)\)
Leaf in the backwards mu and backwards nu direction
\(U_\mu^\dagger(x-\hat{\mu})U_\nu^\dagger(x-\hat{\mu}-\hat{\nu})U_\mu(n-\hat{\nu}-\hat{\mu})\)
\(U_\mu^\dagger(x-\hat{\mu})U_\nu^\dagger(x-\hat{\mu}-\hat{\nu})U_\mu(n-\hat{\nu}-\hat{\mu})U_\nu(n-\hat{\nu})\)
Definition at line 153 of file cuclover.cu.
References conj(), Half_Leaf(), kvol, kvolHalo, and nc.
| void Leaf | ( | Complex_f | Leaves[nc], |
| Complex_f * | ut[nc], | ||
| unsigned int * | iu, | ||
| unsigned int * | id, | ||
| unsigned int | i, | ||
| const unsigned short | mu, | ||
| const unsigned short | nu, | ||
| const unsigned short | leaf ) |
Calculates a leaf for a clover term.
| [out] | Leaves | Array of leaves |
| [in] | ut | Gauge fields |
| [in] | iu,id | Upper and lower site indices |
| [in] | i | Lattice index of the clover in question |
| [in] | mu,nu | Direction in which we're evaluating the leaf |
| [in] | leaf | Which leaf of the clover is being calculated |
Leaves Plaquette
\(U_\mu(x)U_\nu(x+\hat{\mu})U^\dagger_\mu(x+\hat{\nu})\)
\(U_\mu(x)U_\nu(x+\hat{\mu})U^\dagger_\mu(x+\hat{\nu})U^\dagger_\nu(x)\)
Leaf in the forwards nu and backwards mu direction
\(U_\nu(x)U^\dagger_\mu(x-\hat{\mu}+\hat{\nu})U^\dagger_\nu(x-\hat{\mu})\)
\(U_\nu(x)U^\dagger_\mu(x-\hat{\mu}+\hat{\nu})U^\dagger_\nu(x-\hat{\mu})U_\mu(x-\hat{\mu})\)
Leaf in the forwards mu and backwards nu direction
\(U^\dagger_\nu(x-\hat{\nu})U_\mu(x-\hat{\nu})U_\nu(x-\hat{\nu}+\hat{\mu})\)
\(U^\dagger_\nu(x-\hat{\nu})U_\mu(x-\hat{\nu})U_\nu(x-\hat{\nu}+\hat{\mu})U^\dagger_\mu(x)\)
Leaf in the backwards mu and backwards nu direction
\(U_\mu^\dagger(x-\hat{\mu})U_\nu^\dagger(x-\hat{\mu}-\hat{\nu})U_\mu(n-\hat{\nu}-\hat{\mu})\)
\(U_\mu^\dagger(x-\hat{\mu})U_\nu^\dagger(x-\hat{\mu}-\hat{\nu})U_\mu(n-\hat{\nu}-\hat{\mu})U_\nu(n-\hat{\nu})\)
Definition at line 135 of file clover.c.
References Complex_f, Half_Leaf(), kvol, kvolHalo, and nc.