QUDA  1.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Macros | Functions | Variables
gauge_force_reference.cpp File Reference
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <type_traits>
#include "quda.h"
#include "test_util.h"
#include "misc.h"
#include "gauge_force_reference.h"
Include dependency graph for gauge_force_reference.cpp:

Go to the source code of this file.

Classes

struct  fcomplex
 
struct  dcomplex
 
struct  fsu3_matrix
 
struct  fsu3_vector
 
struct  dsu3_matrix
 
struct  dsu3_vector
 
struct  fanti_hermitmat
 
struct  danti_hermitmat
 

Macros

#define CADD(a, b, c)
 
#define CMUL(a, b, c)
 
#define CSUM(a, b)   { (a).real += (b).real; (a).imag += (b).imag; }
 
#define CMULJ_(a, b, c)
 
#define CMUL_J(a, b, c)
 
#define CONJG(a, b)   { (b).real = (a).real; (b).imag = -(a).imag; }
 

Functions

int neighborIndexFullLattice (int i, int dx4, int dx3, int dx2, int dx1)
 
template<typename su3_matrix >
void su3_adjoint (su3_matrix *a, su3_matrix *b)
 
template<typename su3_matrix , typename anti_hermitmat >
void make_anti_hermitian (su3_matrix *m3, anti_hermitmat *ah3)
 
template<typename anti_hermitmat , typename su3_matrix >
static void uncompress_anti_hermitian (anti_hermitmat *mat_antihermit, su3_matrix *mat_su3)
 
template<typename su3_matrix , typename Float >
static void scalar_mult_sub_su3_matrix (su3_matrix *a, su3_matrix *b, Float s, su3_matrix *c)
 
template<typename su3_matrix , typename Float >
static void scalar_mult_add_su3_matrix (su3_matrix *a, su3_matrix *b, Float s, su3_matrix *c)
 
template<typename su3_matrix >
static void mult_su3_nn (su3_matrix *a, su3_matrix *b, su3_matrix *c)
 
template<typename su3_matrix >
static void mult_su3_an (su3_matrix *a, su3_matrix *b, su3_matrix *c)
 
template<typename su3_matrix >
static void mult_su3_na (su3_matrix *a, su3_matrix *b, su3_matrix *c)
 
template<typename su3_matrix >
void print_su3_matrix (su3_matrix *a)
 
int gf_neighborIndexFullLattice (int i, int dx4, int dx3, int dx2, int dx1)
 
template<typename su3_matrix , typename Float >
static void compute_path_product (su3_matrix *staple, su3_matrix **sitelink, su3_matrix **sitelink_ex_2d, int *path, int len, Float loop_coeff, int dir)
 
template<typename su3_matrix , typename anti_hermitmat , typename Float >
static void update_mom (anti_hermitmat *momentum, int dir, su3_matrix **sitelink, su3_matrix *staple, Float eb3)
 
void gauge_force_reference_dir (void *refMom, int dir, double eb3, void **sitelink, void **sitelink_ex_2d, QudaPrecision prec, int **path_dir, int *length, void *loop_coeff, int num_paths)
 
void gauge_force_reference (void *refMom, double eb3, void **sitelink, void **sitelink_ex_2d, QudaPrecision prec, int ***path_dir, int *length, void *loop_coeff, int num_paths)
 

Variables

int Z [4]
 
int V
 
int Vh
 
int Vh_ex
 
int E [4]
 

Macro Definition Documentation

◆ CADD

#define CADD (   a,
  b,
 
)
Value:
{ (c).real = (a).real + (b).real; \
(c).imag = (a).imag + (b).imag; }

Definition at line 19 of file gauge_force_reference.cpp.

◆ CMUL

#define CMUL (   a,
  b,
 
)
Value:
{ (c).real = (a).real*(b).real - (a).imag*(b).imag; \
(c).imag = (a).real*(b).imag + (a).imag*(b).real; }

Definition at line 21 of file gauge_force_reference.cpp.

Referenced by mult_su3_nn().

◆ CMUL_J

#define CMUL_J (   a,
  b,
 
)
Value:
{ (c).real = (a).real*(b).real + (a).imag*(b).imag; \
(c).imag = (a).imag*(b).real - (a).real*(b).imag; }

Definition at line 30 of file gauge_force_reference.cpp.

Referenced by mult_su3_na().

◆ CMULJ_

#define CMULJ_ (   a,
  b,
 
)
Value:
{ (c).real = (a).real*(b).real + (a).imag*(b).imag; \
(c).imag = (a).real*(b).imag - (a).imag*(b).real; }

Definition at line 26 of file gauge_force_reference.cpp.

Referenced by mult_su3_an().

◆ CONJG

#define CONJG (   a,
 
)    { (b).real = (a).real; (b).imag = -(a).imag; }

Definition at line 33 of file gauge_force_reference.cpp.

Referenced by su3_adjoint().

◆ CSUM

#define CSUM (   a,
 
)    { (a).real += (b).real; (a).imag += (b).imag; }

Definition at line 23 of file gauge_force_reference.cpp.

Referenced by mult_su3_an(), mult_su3_na(), and mult_su3_nn().

Function Documentation

◆ compute_path_product()

template<typename su3_matrix , typename Float >
static void compute_path_product ( su3_matrix staple,
su3_matrix **  sitelink,
su3_matrix **  sitelink_ex_2d,
int *  path,
int  len,
Float  loop_coeff,
int  dir 
)
static

Definition at line 277 of file gauge_force_reference.cpp.

References su3_matrix< real >::e, gf_neighborIndexFullLattice(), GOES_FORWARDS, memset(), mult_su3_na(), mult_su3_nn(), OPP_DIR, scalar_mult_add_su3_matrix(), su3_adjoint(), and V.

Referenced by gauge_force_reference_dir().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gauge_force_reference()

void gauge_force_reference ( void *  refMom,
double  eb3,
void **  sitelink,
void **  sitelink_ex_2d,
QudaPrecision  prec,
int ***  path_dir,
int *  length,
void *  loop_coeff,
int  num_paths 
)

Definition at line 408 of file gauge_force_reference.cpp.

References gauge_force_reference_dir().

Referenced by gauge_force_test().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gauge_force_reference_dir()

void gauge_force_reference_dir ( void *  refMom,
int  dir,
double  eb3,
void **  sitelink,
void **  sitelink_ex_2d,
QudaPrecision  prec,
int **  path_dir,
int *  length,
void *  loop_coeff,
int  num_paths 
)

Definition at line 369 of file gauge_force_reference.cpp.

References compute_path_product(), gaugeSiteSize, gSize, memset(), prec, QUDA_DOUBLE_PRECISION, update_mom(), and V.

Referenced by gauge_force_reference().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gf_neighborIndexFullLattice()

int gf_neighborIndexFullLattice ( int  i,
int  dx4,
int  dx3,
int  dx2,
int  dx1 
)

Definition at line 217 of file gauge_force_reference.cpp.

References E, Vh, Vh_ex, X1, X2, X3, and Z.

Referenced by compute_path_product().

Here is the caller graph for this function:

◆ make_anti_hermitian()

template<typename su3_matrix , typename anti_hermitmat >
void make_anti_hermitian ( su3_matrix m3,
anti_hermitmat *  ah3 
)

Definition at line 77 of file gauge_force_reference.cpp.

References su3_matrix< real >::e.

Referenced by update_mom().

Here is the caller graph for this function:

◆ mult_su3_an()

template<typename su3_matrix >
static void mult_su3_an ( su3_matrix a,
su3_matrix b,
su3_matrix c 
)
static

Definition at line 167 of file gauge_force_reference.cpp.

References CMULJ_, CSUM, and su3_matrix< real >::e.

◆ mult_su3_na()

template<typename su3_matrix >
static void mult_su3_na ( su3_matrix a,
su3_matrix b,
su3_matrix c 
)
static

Definition at line 185 of file gauge_force_reference.cpp.

References CMUL_J, CSUM, and su3_matrix< real >::e.

Referenced by compute_path_product(), and update_mom().

Here is the caller graph for this function:

◆ mult_su3_nn()

template<typename su3_matrix >
static void mult_su3_nn ( su3_matrix a,
su3_matrix b,
su3_matrix c 
)
static

Definition at line 150 of file gauge_force_reference.cpp.

References CMUL, CSUM, and su3_matrix< real >::e.

Referenced by compute_path_product().

Here is the caller graph for this function:

◆ neighborIndexFullLattice()

int neighborIndexFullLattice ( int  i,
int  dx4,
int  dx3,
int  dx2,
int  dx1 
)

◆ print_su3_matrix()

template<typename su3_matrix >
void print_su3_matrix ( su3_matrix a)

Definition at line 203 of file gauge_force_reference.cpp.

References su3_matrix< real >::e.

◆ scalar_mult_add_su3_matrix()

template<typename su3_matrix , typename Float >
static void scalar_mult_add_su3_matrix ( su3_matrix a,
su3_matrix b,
Float  s,
su3_matrix c 
)
static

Definition at line 137 of file gauge_force_reference.cpp.

References su3_matrix< real >::e.

Referenced by compute_path_product().

Here is the caller graph for this function:

◆ scalar_mult_sub_su3_matrix()

template<typename su3_matrix , typename Float >
static void scalar_mult_sub_su3_matrix ( su3_matrix a,
su3_matrix b,
Float  s,
su3_matrix c 
)
static

Definition at line 124 of file gauge_force_reference.cpp.

References su3_matrix< real >::e.

Referenced by update_mom().

Here is the caller graph for this function:

◆ su3_adjoint()

template<typename su3_matrix >
void su3_adjoint ( su3_matrix a,
su3_matrix b 
)

Definition at line 66 of file gauge_force_reference.cpp.

References CONJG, and su3_matrix< real >::e.

Referenced by compute_path_product().

Here is the caller graph for this function:

◆ uncompress_anti_hermitian()

template<typename anti_hermitmat , typename su3_matrix >
static void uncompress_anti_hermitian ( anti_hermitmat *  mat_antihermit,
su3_matrix mat_su3 
)
static

Definition at line 95 of file gauge_force_reference.cpp.

References su3_matrix< real >::e.

Referenced by update_mom().

Here is the caller graph for this function:

◆ update_mom()

template<typename su3_matrix , typename anti_hermitmat , typename Float >
static void update_mom ( anti_hermitmat *  momentum,
int  dir,
su3_matrix **  sitelink,
su3_matrix staple,
Float  eb3 
)
static

Definition at line 339 of file gauge_force_reference.cpp.

References make_anti_hermitian(), mult_su3_na(), scalar_mult_sub_su3_matrix(), uncompress_anti_hermitian(), and V.

Referenced by gauge_force_reference_dir().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ E

int E[4]

◆ V

int V

Definition at line 27 of file test_util.cpp.

Referenced by compute_path_product(), gauge_force_reference_dir(), and update_mom().

◆ Vh

int Vh

Definition at line 28 of file test_util.cpp.

Referenced by gf_neighborIndexFullLattice().

◆ Vh_ex

int Vh_ex

◆ Z

int Z[4]

Definition at line 26 of file test_util.cpp.

Referenced by gf_neighborIndexFullLattice().