12 fixed(u.GaugeFixed()),
13 link_type(u.LinkType()),
14 t_boundary(u.TBoundary()),
20 geometry(u.Geometry()),
21 compute_fat_link_max(false),
22 staggeredPhaseType(u.StaggeredPhase()),
23 staggeredPhaseApplied(u.StaggeredPhaseApplied()),
25 site_offset(u.SiteOffset()),
26 site_size(u.SiteSize())
32 geometry(
param.geometry), reconstruct(
param.reconstruct),
34 order(
param.order), fixed(
param.fixed), link_type(
param.link_type), t_boundary(
param.t_boundary),
37 staggeredPhaseType(
param.staggeredPhaseType), staggeredPhaseApplied(
param.staggeredPhaseApplied), i_mu(
param.i_mu),
38 site_offset(
param.site_offset), site_size(
param.site_size)
45 errorQuda(
"Anisotropy only supported for Wilson links");
47 errorQuda(
"Temporal gauge fixing only supported for Wilson links");
73 half_phase_bytes = ((half_phase_bytes + (512-1))/512)*512;
74 half_gauge_bytes = ((half_gauge_bytes + (512-1))/512)*512;
78 bytes = (half_gauge_bytes + half_phase_bytes)*2;
175 send[
i] = link_sendbuf[
i];
176 receive[
i] = ghost_link[
i];
178 if (no_comms_fill)
memcpy(ghost_link[
i], link_sendbuf[
i],
bytes[
i]);
188 if (no_comms_fill)
qudaMemcpy(ghost_link[
i], link_sendbuf[
i],
bytes[
i], cudaMemcpyDeviceToDevice);
249 catch(std::bad_cast &
e) {
250 errorQuda(
"Failed to cast reference to GaugeField");
255 output << static_cast<const LatticeFieldParam &>(
param);
256 output <<
"nColor = " <<
param.nColor << std::endl;
257 output <<
"nFace = " <<
param.nFace << std::endl;
261 output <<
"nInternal = " << nInternal << std::endl;
262 output <<
"order = " <<
param.order << std::endl;
263 output <<
"fixed = " <<
param.fixed << std::endl;
264 output <<
"link_type = " <<
param.link_type << std::endl;
267 output <<
"tadpole = " <<
param.tadpole << std::endl;
268 output <<
"scale = " <<
param.
scale << std::endl;
269 output <<
"create = " <<
param.create << std::endl;
270 output <<
"geometry = " <<
param.geometry << std::endl;
271 output <<
"staggeredPhaseType = " <<
param.staggeredPhaseType << std::endl;
272 output <<
"staggeredPhaseApplied = " <<
param.staggeredPhaseApplied << std::endl;
279 errorQuda(
"Not implemented for this order %d",
a.FieldOrder());
282 if (
a.Ncolor() != 3)
errorQuda(
"Not implemented for Ncolor = %d",
a.Ncolor());
285 errorQuda(
"Casting a GaugeField into ColorSpinorField not possible in half precision");
288 spinor_param.
nColor = (
a.Geometry()*
a.Reconstruct())/2;
289 spinor_param.
nSpin = 1;
290 spinor_param.
nDim =
a.Ndim();
291 for (
int d=0;
d<
a.Ndim();
d++) spinor_param.
x[
d] =
a.X()[
d];
293 spinor_param.
pad =
a.Pad();
300 spinor_param.
v = (
void*)
a.Gauge_p();
#define qudaMemcpy(dst, src, count, kind)
#define pool_pinned_free(ptr)
double norm2(const ColorSpinorField &a)
QudaReconstructType reconstruct
bool staggeredPhaseApplied
uint64_t checksum(bool mini=false) const
static ColorSpinorField * Create(const ColorSpinorParam ¶m)
uint64_t Checksum(const GaugeField &u, bool mini=false)
void ax(const double &a, ColorSpinorField &x)
void applyGaugePhase(GaugeField &u)
GaugeField(const GaugeFieldParam ¶m)
QudaSiteSubset siteSubset
std::ostream & operator<<(std::ostream &output, const CloverFieldParam ¶m)
double norm2(const CloverField &a, bool inverse=false)
QudaFieldGeometry geometry
void comm_free(MsgHandle *mh)
double norm1(const CloverField &u, bool inverse=false)
enum QudaDirection_s QudaDirection
void checkField(const LatticeField &) const
void ax(const double &a, GaugeField &u)
Scale the gauge field by the scalar a.
QudaFieldLocation location
#define comm_declare_send_relative(buffer, dim, dir, nbytes)
void checkField(const LatticeField &a) const
#define comm_declare_receive_relative(buffer, dim, dir, nbytes)
QudaFieldOrder fieldOrder
#define ALIGNMENT_ADJUST(n)
QudaGammaBasis gammaBasis
void comm_start(MsgHandle *mh)
QudaGhostExchange ghostExchange
unsigned long long uint64_t
void exchange(void **recv, void **send, QudaDirection dir) const
Exchange the buffers across all dimensions in a given direction.
void exchangeGhost(QudaLinkDirection link_direction=QUDA_LINK_BACKWARDS)
Exchange the ghost and store store in the padded region.
QudaReconstructType reconstruct
size_t ghost_face_bytes[QUDA_MAX_DIM]
void * memcpy(void *__dst, const void *__src, size_t __n)
QudaFieldLocation Location() const
int surface[QUDA_MAX_DIM]
#define pool_pinned_malloc(size)
void exchangeGhost(QudaLinkDirection link_direction=QUDA_LINK_BACKWARDS)
Exchange the ghost and store store in the padded region.
void createGhostZone(const int *R, bool no_comms_fill) const
int ghostOffset[QUDA_MAX_DIM][2]
double norm1(const ColorSpinorField &b)
GaugeFieldParam(void *const h_gauge=NULL)
void applyStaggeredPhase()
ColorSpinorParam colorSpinorParam(const CloverField &a, bool inverse)
int surfaceCB[QUDA_MAX_DIM]
void comm_wait(MsgHandle *mh)
QudaGaugeFieldOrder order
static __inline__ size_t size_t d
int comm_dim_partitioned(int dim)
int ghostFace[QUDA_MAX_DIM]
void removeStaggeredPhase()