QUDA  0.9.0
Macros | Functions
misc.cpp File Reference
#include <stdio.h>
#include <stdlib.h>
#include "quda.h"
#include <string.h>
#include "invert_quda.h"
#include "misc.h"
#include <assert.h>
#include "util_quda.h"
#include <test_util.h>
Include dependency graph for misc.cpp:

Go to the source code of this file.

Macros

#define stSpinorSiteSize   6
 
#define SMALL_NUM   1e-24
 

Functions

template<typename Float >
void display_spinor_internal (Float *spinor)
 
void display_spinor (void *spinor, int len, int precision)
 
template<typename Float >
void display_link_internal (Float *link)
 
void display_link (void *link, int len, int precision)
 
template<typename Float >
void accumulateConjugateProduct (Float *a, Float *b, Float *c, int sign)
 
template<typename Float >
int link_sanity_check_internal_12 (Float *link, int dir, int ga_idx, QudaGaugeParam *gaugeParam, int oddBit)
 
template<typename Float >
int site_link_sanity_check_internal_12 (Float *link, int dir, int ga_idx, QudaGaugeParam *gaugeParam, int oddBit)
 
template<typename Float >
void complexAddTo (Float *a, Float *b)
 
template<typename Float >
void complexProduct (Float *a, Float *b, Float *c)
 
template<typename Float >
void complexConjugateProduct (Float *a, Float *b, Float *c)
 
template<typename Float >
void complexDotProduct (Float *a, Float *b, Float *c)
 
template<typename Float >
void accumulateComplexProduct (Float *a, Float *b, Float *c, Float sign)
 
template<typename Float >
void accumulateComplexDotProduct (Float *a, Float *b, Float *c)
 
template<typename Float >
int link_sanity_check_internal_8 (Float *link, int dir, int ga_idx, QudaGaugeParam *gaugeParam, int oddBit)
 
int link_sanity_check (void *link, int len, int precision, int dir, QudaGaugeParam *gaugeParam)
 
int site_link_sanity_check (void *link, int len, int precision, QudaGaugeParam *gaugeParam)
 
QudaVerbosity get_verbosity_type (char *s)
 
const char * get_verbosity_str (QudaVerbosity type)
 
QudaReconstructType get_recon (char *s)
 
QudaPrecision get_prec (char *s)
 
const char * get_prec_str (QudaPrecision prec)
 
const char * get_unitarization_str (bool svd_only)
 
const char * get_gauge_order_str (QudaGaugeFieldOrder order)
 
const char * get_recon_str (QudaReconstructType recon)
 
const char * get_test_type (int t)
 
int get_rank_order (char *s)
 
QudaDslashType get_dslash_type (char *s)
 
const char * get_dslash_str (QudaDslashType type)
 
QudaMassNormalization get_mass_normalization_type (char *s)
 
const char * get_mass_normalization_str (QudaMassNormalization type)
 
QudaMatPCType get_matpc_type (char *s)
 
const char * get_matpc_str (QudaMatPCType type)
 
QudaSolveType get_solve_type (char *s)
 
const char * get_solve_str (QudaSolveType type)
 
QudaTwistFlavorType get_flavor_type (char *s)
 
const char * get_flavor_str (QudaTwistFlavorType type)
 
QudaInverterType get_solver_type (char *s)
 
const char * get_solver_str (QudaInverterType type)
 
const char * get_quda_ver_str ()
 
QudaExtLibType get_solve_ext_lib_type (char *s)
 
QudaFieldLocation get_df_location_ritz (char *s)
 
QudaMemoryType get_df_mem_type_ritz (char *s)
 

Macro Definition Documentation

◆ SMALL_NUM

#define SMALL_NUM   1e-24

◆ stSpinorSiteSize

#define stSpinorSiteSize   6

Definition at line 12 of file misc.cpp.

Referenced by display_spinor().

Function Documentation

◆ accumulateComplexDotProduct()

template<typename Float >
void accumulateComplexDotProduct ( Float *  a,
Float *  b,
Float *  c 
)

Definition at line 323 of file misc.cpp.

References a, b, and c.

◆ accumulateComplexProduct()

template<typename Float >
void accumulateComplexProduct ( Float *  a,
Float *  b,
Float *  c,
Float  sign 
)

Definition at line 316 of file misc.cpp.

References a, b, c, and deg_tm_dslash_cuda_gen::sign().

Referenced by link_sanity_check_internal_8().

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

◆ accumulateConjugateProduct()

template<typename Float >
void accumulateConjugateProduct ( Float *  a,
Float *  b,
Float *  c,
int  sign 
)

Definition at line 84 of file misc.cpp.

References a, b, c, and deg_tm_dslash_cuda_gen::sign().

Referenced by link_sanity_check_internal_12(), and site_link_sanity_check_internal_12().

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

◆ complexAddTo()

template<typename Float >
void complexAddTo ( Float *  a,
Float *  b 
)

Definition at line 288 of file misc.cpp.

References a, and b.

◆ complexConjugateProduct()

template<typename Float >
void complexConjugateProduct ( Float *  a,
Float *  b,
Float *  c 
)

Definition at line 302 of file misc.cpp.

References a, b, and c.

Referenced by link_sanity_check_internal_8().

Here is the caller graph for this function:

◆ complexDotProduct()

template<typename Float >
void complexDotProduct ( Float *  a,
Float *  b,
Float *  c 
)

Definition at line 309 of file misc.cpp.

References a, b, and c.

Referenced by link_sanity_check_internal_8().

Here is the caller graph for this function:

◆ complexProduct()

template<typename Float >
void complexProduct ( Float *  a,
Float *  b,
Float *  c 
)

Definition at line 295 of file misc.cpp.

References a, b, and c.

◆ display_link()

void display_link ( void *  link,
int  len,
int  precision 
)

Definition at line 63 of file misc.cpp.

References display_link_internal(), gaugeSiteSize, fused_exterior_ndeg_tm_dslash_cuda_gen::i, len, QUDA_DOUBLE_PRECISION, and QUDA_SINGLE_PRECISION.

Here is the call graph for this function:

◆ display_link_internal()

template<typename Float >
void display_link_internal ( Float *  link)

Definition at line 47 of file misc.cpp.

References fused_exterior_ndeg_tm_dslash_cuda_gen::i, and printf().

Referenced by display_link(), link_sanity_check(), link_sanity_check_internal_12(), link_sanity_check_internal_8(), site_link_sanity_check(), and site_link_sanity_check_internal_12().

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

◆ display_spinor()

void display_spinor ( void *  spinor,
int  len,
int  precision 
)

Definition at line 26 of file misc.cpp.

References display_spinor_internal(), fused_exterior_ndeg_tm_dslash_cuda_gen::i, len, QUDA_DOUBLE_PRECISION, QUDA_SINGLE_PRECISION, spinor, and stSpinorSiteSize.

Here is the call graph for this function:

◆ display_spinor_internal()

template<typename Float >
void display_spinor_internal ( Float *  spinor)

Definition at line 14 of file misc.cpp.

References printf(), and spinor.

Referenced by display_spinor().

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

◆ get_df_location_ritz()

QudaFieldLocation get_df_location_ritz ( char *  s)

Definition at line 1261 of file misc.cpp.

References exit(), fprintf(), QUDA_CPU_FIELD_LOCATION, QUDA_CUDA_FIELD_LOCATION, QUDA_INVALID_FIELD_LOCATION, ret, s, and strcmp().

Referenced by process_command_line_option().

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

◆ get_df_mem_type_ritz()

QudaMemoryType get_df_mem_type_ritz ( char *  s)

Definition at line 1279 of file misc.cpp.

References exit(), fprintf(), QUDA_MEMORY_DEVICE, QUDA_MEMORY_INVALID, QUDA_MEMORY_MAPPED, QUDA_MEMORY_PINNED, ret, s, and strcmp().

Referenced by process_command_line_option().

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

◆ get_dslash_str()

const char* get_dslash_str ( QudaDslashType  type)

◆ get_dslash_type()

QudaDslashType get_dslash_type ( char *  s)

◆ get_flavor_str()

const char* get_flavor_str ( QudaTwistFlavorType  type)

◆ get_flavor_type()

QudaTwistFlavorType get_flavor_type ( char *  s)

Definition at line 1070 of file misc.cpp.

References exit(), fprintf(), QUDA_TWIST_DEG_DOUBLET, QUDA_TWIST_NO, QUDA_TWIST_NONDEG_DOUBLET, QUDA_TWIST_SINGLET, ret, s, and strcmp().

Referenced by process_command_line_option().

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

◆ get_gauge_order_str()

const char* get_gauge_order_str ( QudaGaugeFieldOrder  order)

Definition at line 743 of file misc.cpp.

References QUDA_CPS_WILSON_GAUGE_ORDER, QUDA_MILC_GAUGE_ORDER, QUDA_QDP_GAUGE_ORDER, and ret.

Referenced by display_test_info().

Here is the caller graph for this function:

◆ get_mass_normalization_str()

const char* get_mass_normalization_str ( QudaMassNormalization  type)

Definition at line 943 of file misc.cpp.

References exit(), fprintf(), QUDA_ASYMMETRIC_MASS_NORMALIZATION, QUDA_KAPPA_NORMALIZATION, QUDA_MASS_NORMALIZATION, and s.

Referenced by display_test_info().

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

◆ get_mass_normalization_type()

QudaMassNormalization get_mass_normalization_type ( char *  s)

Definition at line 924 of file misc.cpp.

References exit(), fprintf(), QUDA_ASYMMETRIC_MASS_NORMALIZATION, QUDA_INVALID_NORMALIZATION, QUDA_KAPPA_NORMALIZATION, QUDA_MASS_NORMALIZATION, ret, s, and strcmp().

Referenced by process_command_line_option().

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

◆ get_matpc_str()

const char* get_matpc_str ( QudaMatPCType  type)

Definition at line 987 of file misc.cpp.

References exit(), fprintf(), QUDA_MATPC_EVEN_EVEN, QUDA_MATPC_EVEN_EVEN_ASYMMETRIC, QUDA_MATPC_ODD_ODD, QUDA_MATPC_ODD_ODD_ASYMMETRIC, and ret.

Referenced by display_test_info().

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

◆ get_matpc_type()

QudaMatPCType get_matpc_type ( char *  s)

Definition at line 966 of file misc.cpp.

References exit(), fprintf(), QUDA_MATPC_EVEN_EVEN, QUDA_MATPC_EVEN_EVEN_ASYMMETRIC, QUDA_MATPC_INVALID, QUDA_MATPC_ODD_ODD, QUDA_MATPC_ODD_ODD_ASYMMETRIC, ret, s, and strcmp().

Referenced by process_command_line_option().

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

◆ get_prec()

QudaPrecision get_prec ( char *  s)

Definition at line 685 of file misc.cpp.

References exit(), fprintf(), QUDA_DOUBLE_PRECISION, QUDA_HALF_PRECISION, QUDA_SINGLE_PRECISION, ret, s, and strcmp().

Here is the call graph for this function:

◆ get_prec_str()

const char* get_prec_str ( QudaPrecision  prec)

Definition at line 704 of file misc.cpp.

References prec, QUDA_DOUBLE_PRECISION, QUDA_HALF_PRECISION, QUDA_SINGLE_PRECISION, and ret.

Referenced by display_test_info(), and main().

Here is the caller graph for this function:

◆ get_quda_ver_str()

const char* get_quda_ver_str ( )

Definition at line 1229 of file misc.cpp.

References QUDA_VERSION_MAJOR, QUDA_VERSION_MINOR, QUDA_VERSION_SUBMINOR, and sprintf().

Referenced by process_command_line_option().

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

◆ get_rank_order()

int get_rank_order ( char *  s)

Definition at line 828 of file misc.cpp.

References exit(), fprintf(), ret, s, and strcmp().

Referenced by process_command_line_option().

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

◆ get_recon()

QudaReconstructType get_recon ( char *  s)

Definition at line 660 of file misc.cpp.

References exit(), fprintf(), QUDA_RECONSTRUCT_12, QUDA_RECONSTRUCT_13, QUDA_RECONSTRUCT_8, QUDA_RECONSTRUCT_9, QUDA_RECONSTRUCT_NO, ret, s, and strcmp().

Referenced by process_command_line_option().

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

◆ get_recon_str()

const char* get_recon_str ( QudaReconstructType  recon)

Definition at line 770 of file misc.cpp.

References QUDA_RECONSTRUCT_12, QUDA_RECONSTRUCT_13, QUDA_RECONSTRUCT_8, QUDA_RECONSTRUCT_9, QUDA_RECONSTRUCT_NO, and ret.

Referenced by display_test_info().

Here is the caller graph for this function:

◆ get_solve_ext_lib_type()

QudaExtLibType get_solve_ext_lib_type ( char *  s)

Definition at line 1244 of file misc.cpp.

References exit(), fprintf(), QUDA_EIGEN_EXTLIB, QUDA_EXTLIB_INVALID, QUDA_MAGMA_EXTLIB, ret, s, and strcmp().

Referenced by process_command_line_option().

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

◆ get_solve_str()

const char* get_solve_str ( QudaSolveType  type)

Definition at line 1038 of file misc.cpp.

References exit(), fprintf(), QUDA_DIRECT_PC_SOLVE, QUDA_DIRECT_SOLVE, QUDA_NORMERR_PC_SOLVE, QUDA_NORMERR_SOLVE, QUDA_NORMOP_PC_SOLVE, QUDA_NORMOP_SOLVE, and ret.

Here is the call graph for this function:

◆ get_solve_type()

QudaSolveType get_solve_type ( char *  s)

Definition at line 1013 of file misc.cpp.

References exit(), fprintf(), QUDA_DIRECT_PC_SOLVE, QUDA_DIRECT_SOLVE, QUDA_INVALID_SOLVE, QUDA_NORMERR_PC_SOLVE, QUDA_NORMERR_SOLVE, QUDA_NORMOP_PC_SOLVE, QUDA_NORMOP_SOLVE, ret, s, and strcmp().

Referenced by process_command_line_option().

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

◆ get_solver_str()

const char* get_solver_str ( QudaInverterType  type)

◆ get_solver_type()

QudaInverterType get_solver_type ( char *  s)

◆ get_test_type()

const char* get_test_type ( int  t)

Definition at line 798 of file misc.cpp.

References ret, and t.

Referenced by display_test_info().

Here is the caller graph for this function:

◆ get_unitarization_str()

const char* get_unitarization_str ( bool  svd_only)

Definition at line 730 of file misc.cpp.

References ret.

Referenced by display_test_info().

Here is the caller graph for this function:

◆ get_verbosity_str()

const char* get_verbosity_str ( QudaVerbosity  type)

Definition at line 634 of file misc.cpp.

References exit(), fprintf(), QUDA_DEBUG_VERBOSE, QUDA_SILENT, QUDA_SUMMARIZE, QUDA_VERBOSE, and ret.

Here is the call graph for this function:

◆ get_verbosity_type()

QudaVerbosity get_verbosity_type ( char *  s)

Definition at line 613 of file misc.cpp.

References exit(), fprintf(), QUDA_DEBUG_VERBOSE, QUDA_INVALID_VERBOSITY, QUDA_SILENT, QUDA_SUMMARIZE, QUDA_VERBOSE, ret, s, and strcmp().

Referenced by process_command_line_option().

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

◆ link_sanity_check()

int link_sanity_check ( void *  link,
int  len,
int  precision,
int  dir,
QudaGaugeParam gaugeParam 
)

◆ link_sanity_check_internal_12()

template<typename Float >
int link_sanity_check_internal_12 ( Float *  link,
int  dir,
int  ga_idx,
QudaGaugeParam gaugeParam,
int  oddBit 
)

◆ link_sanity_check_internal_8()

template<typename Float >
int link_sanity_check_internal_8 ( Float *  link,
int  dir,
int  ga_idx,
QudaGaugeParam gaugeParam,
int  oddBit 
)

◆ site_link_sanity_check()

int site_link_sanity_check ( void *  link,
int  len,
int  precision,
QudaGaugeParam gaugeParam 
)

◆ site_link_sanity_check_internal_12()

template<typename Float >
int site_link_sanity_check_internal_12 ( Float *  link,
int  dir,
int  ga_idx,
QudaGaugeParam gaugeParam,
int  oddBit 
)

Definition at line 190 of file misc.cpp.

References a, accumulateConjugateProduct(), b, c, dw_dslash_4D_cuda_gen::coeff(), comm_coord(), comm_dim(), delta, display_link_internal(), fullLatticeIndex(), ga_idx, gaugeParam, fused_exterior_ndeg_tm_dslash_cuda_gen::i, index(), memset(), printf(), ret, TUP, QudaGaugeParam_s::X, XUP, YUP, and ZUP.

Referenced by site_link_sanity_check().

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