QUDA  v1.1.0
A library for QCD on GPUs
Macros | Enumerations | Functions | Variables
face_gauge.cpp File Reference
#include <cstdio>
#include <cstdlib>
#include <string.h>
#include <sys/time.h>
#include <assert.h>
#include <quda_internal.h>
#include <comm_quda.h>
#include <host_utils.h>
#include "gauge_field.h"

Go to the source code of this file.

Macros

#define gauge_site_size   18
 
#define MEMCOPY_GAUGE_FIELDS_GRID_TO_BUF(ghost_buf, dst_idx, sitelink, src_idx, num, dir, geom)
 
#define MEMCOPY_GAUGE_FIELDS_BUF_TO_GRID(sitelink, dst_idx, ghost_buf, src_idx, num, dir, geom)
 
#define MEMCOPY_GAUGE_FIELDS_BUF_TO_GRID_T(sitelink, ghost_buf, dst_face, src_face, dir, geom)
 

Enumerations

enum  {
  XUP = 0 , YUP = 1 , ZUP = 2 , TUP = 3 ,
  TDOWN = 4 , ZDOWN = 5 , YDOWN = 6 , XDOWN = 7
}
 

Functions

template<typename Float >
void packGhostAllStaples (Float *cpuStaple, Float **cpuGhostBack, Float **cpuGhostFwd, int nFace, int *X)
 
void pack_ghost_all_staples_cpu (void *staple, void **cpuGhostStapleBack, void **cpuGhostStapleFwd, int nFace, QudaPrecision precision, int *X)
 
void pack_gauge_diag (void *buf, int *X, void **sitelink, int nu, int mu, int dir1, int dir2, QudaPrecision prec)
 
template<typename Float >
void packGhostAllLinks (Float **cpuLink, Float **cpuGhostBack, Float **cpuGhostFwd, int dir, int nFace, int *X)
 
void pack_ghost_all_links (void **cpuLink, void **cpuGhostBack, void **cpuGhostFwd, int dir, int nFace, QudaPrecision precision, int *X)
 
void exchange_llfat_init (QudaPrecision prec)
 
template<typename Float >
void exchange_sitelink_diag (int *X, Float **sitelink, Float **ghost_sitelink_diag, int optflag)
 
template<typename Float >
void exchange_sitelink (int *X, Float **sitelink, Float **ghost_sitelink, Float **ghost_sitelink_diag, Float **sitelink_fwd_sendbuf, Float **sitelink_back_sendbuf, int optflag)
 
void exchange_cpu_sitelink (int *X, void **sitelink, void **ghost_sitelink, void **ghost_sitelink_diag, QudaPrecision gPrecision, QudaGaugeParam *param, int optflag)
 
void exchange_cpu_sitelink_ex (int *X, int *R, void **sitelink, QudaGaugeFieldOrder cpu_order, QudaPrecision gPrecision, int optflag, int geometry)
 
template<typename Float >
void do_exchange_cpu_staple (Float *staple, Float **ghost_staple, Float **staple_fwd_sendbuf, Float **staple_back_sendbuf, int *X)
 
void exchange_cpu_staple (int *X, void *staple, void **ghost_staple, QudaPrecision gPrecision)
 
void exchange_llfat_cleanup (void)
 

Variables

qudaStream_tstream
 

Macro Definition Documentation

◆ gauge_site_size

#define gauge_site_size   18

Definition at line 34 of file face_gauge.cpp.

◆ MEMCOPY_GAUGE_FIELDS_BUF_TO_GRID

#define MEMCOPY_GAUGE_FIELDS_BUF_TO_GRID (   sitelink,
  dst_idx,
  ghost_buf,
  src_idx,
  num,
  dir,
  geom 
)

Definition at line 561 of file face_gauge.cpp.

◆ MEMCOPY_GAUGE_FIELDS_BUF_TO_GRID_T

#define MEMCOPY_GAUGE_FIELDS_BUF_TO_GRID_T (   sitelink,
  ghost_buf,
  dst_face,
  src_face,
  dir,
  geom 
)

Definition at line 594 of file face_gauge.cpp.

◆ MEMCOPY_GAUGE_FIELDS_GRID_TO_BUF

#define MEMCOPY_GAUGE_FIELDS_GRID_TO_BUF (   ghost_buf,
  dst_idx,
  sitelink,
  src_idx,
  num,
  dir,
  geom 
)
Value:
if(src_oddness) src_idx += Vh_ex; \
if(dst_oddness) dst_idx += R[dir]*slice_3d[dir]/2; \
if(cpu_order == QUDA_QDP_GAUGE_ORDER) { \
for(int linkdir=0; linkdir < 4; linkdir++){ \
char* src = (char*) sitelink[linkdir] + (src_idx)*gaugebytes; \
char* dst = ((char*)ghost_buf[dir])+ linkdir*R[dir]*slice_3d[dir]*gaugebytes + (dst_idx)*gaugebytes; \
memcpy(dst, src, gaugebytes*(num)); \
} \
} else if (cpu_order == QUDA_MILC_GAUGE_ORDER) { \
char* src = ((char*)sitelink)+ (geom)*(src_idx)*gaugebytes; \
char* dst = ((char*)ghost_buf[dir]) + (geom)*(dst_idx)*gaugebytes; \
memcpy(dst, src, (geom)*gaugebytes*(num)); \
} else { \
errorQuda("Unsupported gauge order"); \
} \
@ QUDA_QDP_GAUGE_ORDER
Definition: enum_quda.h:44
@ QUDA_MILC_GAUGE_ORDER
Definition: enum_quda.h:47
int Vh_ex
Definition: host_utils.cpp:46

Definition at line 544 of file face_gauge.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
XUP 
YUP 
ZUP 
TUP 
TDOWN 
ZDOWN 
YDOWN 
XDOWN 

Definition at line 21 of file face_gauge.cpp.

Function Documentation

◆ do_exchange_cpu_staple()

template<typename Float >
void do_exchange_cpu_staple ( Float *  staple,
Float **  ghost_staple,
Float **  staple_fwd_sendbuf,
Float **  staple_back_sendbuf,
int *  X 
)

Definition at line 930 of file face_gauge.cpp.

◆ exchange_cpu_sitelink()

void exchange_cpu_sitelink ( int *  X,
void **  sitelink,
void **  ghost_sitelink,
void **  ghost_sitelink_diag,
QudaPrecision  gPrecision,
QudaGaugeParam param,
int  optflag 
)

Definition at line 512 of file face_gauge.cpp.

◆ exchange_cpu_sitelink_ex()

void exchange_cpu_sitelink_ex ( int *  X,
int *  R,
void **  sitelink,
QudaGaugeFieldOrder  cpu_order,
QudaPrecision  gPrecision,
int  optflag,
int  geometry 
)

Definition at line 644 of file face_gauge.cpp.

◆ exchange_cpu_staple()

void exchange_cpu_staple ( int *  X,
void *  staple,
void **  ghost_staple,
QudaPrecision  gPrecision 
)

Definition at line 976 of file face_gauge.cpp.

◆ exchange_llfat_cleanup()

void exchange_llfat_cleanup ( void  )

Definition at line 1003 of file face_gauge.cpp.

◆ exchange_llfat_init()

void exchange_llfat_init ( QudaPrecision  prec)

Definition at line 373 of file face_gauge.cpp.

◆ exchange_sitelink()

template<typename Float >
void exchange_sitelink ( int *  X,
Float **  sitelink,
Float **  ghost_sitelink,
Float **  ghost_sitelink_diag,
Float **  sitelink_fwd_sendbuf,
Float **  sitelink_back_sendbuf,
int  optflag 
)

Definition at line 463 of file face_gauge.cpp.

◆ exchange_sitelink_diag()

template<typename Float >
void exchange_sitelink_diag ( int *  X,
Float **  sitelink,
Float **  ghost_sitelink_diag,
int  optflag 
)

Definition at line 394 of file face_gauge.cpp.

◆ pack_gauge_diag()

void pack_gauge_diag ( void *  buf,
int *  X,
void **  sitelink,
int  nu,
int  mu,
int  dir1,
int  dir2,
QudaPrecision  prec 
)

Definition at line 193 of file face_gauge.cpp.

◆ pack_ghost_all_links()

void pack_ghost_all_links ( void **  cpuLink,
void **  cpuGhostBack,
void **  cpuGhostFwd,
int  dir,
int  nFace,
QudaPrecision  precision,
int *  X 
)

Definition at line 364 of file face_gauge.cpp.

◆ pack_ghost_all_staples_cpu()

void pack_ghost_all_staples_cpu ( void *  staple,
void **  cpuGhostStapleBack,
void **  cpuGhostStapleFwd,
int  nFace,
QudaPrecision  precision,
int *  X 
)

Definition at line 184 of file face_gauge.cpp.

◆ packGhostAllLinks()

template<typename Float >
void packGhostAllLinks ( Float **  cpuLink,
Float **  cpuGhostBack,
Float **  cpuGhostFwd,
int  dir,
int  nFace,
int *  X 
)

Definition at line 258 of file face_gauge.cpp.

◆ packGhostAllStaples()

template<typename Float >
void packGhostAllStaples ( Float *  cpuStaple,
Float **  cpuGhostBack,
Float **  cpuGhostFwd,
int  nFace,
int *  X 
)

Definition at line 76 of file face_gauge.cpp.

Variable Documentation

◆ stream

qudaStream_t* stream
extern