QUDA  0.9.0
Classes | Macros | Functions | Variables
staggered_dslash_ctest.cpp File Reference
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <quda.h>
#include <quda_internal.h>
#include <dirac_quda.h>
#include <dslash_quda.h>
#include <invert_quda.h>
#include <util_quda.h>
#include <blas_quda.h>
#include <misc.h>
#include <test_util.h>
#include <dslash_util.h>
#include <staggered_dslash_reference.h>
#include <gauge_field.h>
#include <assert.h>
#include <gtest.h>
Include dependency graph for staggered_dslash_ctest.cpp:

Go to the source code of this file.

Classes

struct  DslashTime
 
class  StaggeredDslashTest
 

Macros

#define MAX(a, b)   ((a)>(b)?(a):(b))
 
#define staggeredSpinorSiteSize   6
 

Functions

void usage (char **argv)
 
void init (int precision, QudaReconstructType link_recon)
 
void end (void)
 
DslashTime dslashCUDA (int niter)
 
void staggeredDslashRef ()
 
void display_test_info (int precision, QudaReconstructType link_recon)
 
void usage_extra (char **argv)
 
 TEST_P (StaggeredDslashTest, verify)
 
 TEST_P (StaggeredDslashTest, benchmark)
 
int main (int argc, char **argv)
 
std::string getstaggereddslashtestname (testing::TestParamInfo<::testing::tuple< int, int, int >> param)
 
 INSTANTIATE_TEST_CASE_P (QUDA, StaggeredDslashTest, Combine(Range(0, 3), ::testing::Values(QUDA_RECONSTRUCT_NO, QUDA_RECONSTRUCT_12, QUDA_RECONSTRUCT_8), ::testing::Values(0)), getstaggereddslashtestname)
 

Variables

QudaDslashType dslash_type
 
int test_type
 
QudaGaugeParam gaugeParam
 
QudaInvertParam inv_param
 
cpuGaugeFieldcpuFat = NULL
 
cpuGaugeFieldcpuLong = NULL
 
cpuColorSpinorFieldspinor
 
cpuColorSpinorFieldspinorOut
 
cpuColorSpinorFieldspinorRef
 
cpuColorSpinorFieldtmpCpu
 
cudaColorSpinorFieldcudaSpinor
 
cudaColorSpinorFieldcudaSpinorOut
 
cudaColorSpinorFieldtmp
 
void * hostGauge [4]
 
void * fatlink [4]
 
void * longlink [4]
 
QudaParity parity = QUDA_EVEN_PARITY
 
QudaDagType dagger
 
int transfer = 0
 
int xdim
 
int ydim
 
int zdim
 
int tdim
 
int gridsize_from_cmdline []
 
int device
 
bool verify_results
 
int niter
 
bool kernel_pack_t
 
double mass
 
int X [4]
 
int Nsrc
 
Diracdirac
 
const char * prec_str [] = {"half", "single", "double"}
 
const char * recon_str [] = {"r18", "r13", "r9"}
 

Macro Definition Documentation

◆ MAX

#define MAX (   a,
  b 
)    ((a)>(b)?(a):(b))

Definition at line 25 of file staggered_dslash_ctest.cpp.

Referenced by init().

◆ staggeredSpinorSiteSize

#define staggeredSpinorSiteSize   6

Definition at line 26 of file staggered_dslash_ctest.cpp.

Function Documentation

◆ display_test_info()

void display_test_info ( int  precision,
QudaReconstructType  link_recon 
)

Definition at line 433 of file staggered_dslash_ctest.cpp.

References dagger, get_prec_str(), get_recon_str(), link_recon, prec, printfQuda, QUDA_DOUBLE_PRECISION, QUDA_HALF_PRECISION, QUDA_SINGLE_PRECISION, return(), tdim, test_type, xdim, ydim, and zdim.

Referenced by StaggeredDslashTest::SetUp().

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

◆ dslashCUDA()

DslashTime dslashCUDA ( int  niter)

◆ end()

void end ( void  )

Definition at line 289 of file staggered_dslash_ctest.cpp.

References commDimPartitionedReset(), cpuFat, cpuLong, cudaSpinor, cudaSpinorOut, dirac, fatlink, free(), freeGaugeQuda(), longlink, spinor, spinorOut, spinorRef, tmp, tmpCpu, and transfer.

Referenced by dslashCUDA(), and StaggeredDslashTest::TearDown().

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

◆ getstaggereddslashtestname()

std::string getstaggereddslashtestname ( testing::TestParamInfo<::testing::tuple< int, int, int >>  param)

Definition at line 598 of file staggered_dslash_ctest.cpp.

References param, prec, and prec_str.

◆ init()

void init ( int  precision,
QudaReconstructType  link_recon 
)

Definition at line 78 of file staggered_dslash_ctest.cpp.

References QudaGaugeParam_s::anisotropy, checkCudaError, construct_fat_long_gauge_field(), QudaGaugeParam_s::cpu_prec, QudaInvertParam_s::cpu_prec, cpuFat, cpuLong, quda::ColorSpinorParam::create, quda::Dirac::create(), csParam, QudaGaugeParam_s::cuda_prec, QudaInvertParam_s::cuda_prec, QudaGaugeParam_s::cuda_prec_sloppy, cudaSpinor, cudaSpinorOut, d, dagger, QudaInvertParam_s::dagger, dirac, QudaInvertParam_s::dirac_order, dslash_type, QudaInvertParam_s::dslash_type, dw_setDims(), errorQuda, fatlink, quda::ColorSpinorParam::fieldOrder, float, QudaGaugeParam_s::ga_pad, QudaInvertParam_s::gamma_basis, quda::ColorSpinorParam::gammaBasis, QudaGaugeParam_s::gauge_fix, QudaGaugeParam_s::gauge_order, QudaGaugeParam_s::gaugeGiB, gaugeParam, gaugeSiteSize, quda::GaugeField::Ghost(), quda::LatticeFieldParam::ghostExchange, gSize, QudaInvertParam_s::input_location, inv_param, kernel_pack_t, link_recon, loadGaugeQuda(), longlink, malloc(), mass, QudaInvertParam_s::mass, QudaInvertParam_s::matpc_type, MAX, quda::ColorSpinorParam::nColor, quda::LatticeFieldParam::nDim, newQudaGaugeParam(), newQudaInvertParam(), quda::ColorSpinorParam::nSpin, Nsrc, QudaInvertParam_s::output_location, quda::LatticeFieldParam::pad, prec, quda::LatticeFieldParam::precision, QUDA_ANTI_PERIODIC_T, QUDA_ASQTAD_DSLASH, QUDA_ASQTAD_FAT_LINKS, QUDA_ASQTAD_LONG_LINKS, QUDA_CPU_FIELD_LOCATION, QUDA_DEGRAND_ROSSI_GAMMA_BASIS, QUDA_DIRAC_ORDER, QUDA_DOUBLE_PRECISION, QUDA_EVEN_ODD_SITE_ORDER, QUDA_FLOAT2_FIELD_ORDER, QUDA_FULL_SITE_SUBSET, QUDA_GAUGE_FIXED_NO, QUDA_GHOST_EXCHANGE_PAD, QUDA_HALF_PRECISION, QUDA_MAT_SOLUTION, QUDA_MATPC_EVEN_EVEN, QUDA_MATPC_SOLUTION, QUDA_PARITY_SITE_SUBSET, QUDA_QDP_GAUGE_ORDER, QUDA_RANDOM_SOURCE, QUDA_RECONSTRUCT_12, QUDA_RECONSTRUCT_13, QUDA_RECONSTRUCT_8, QUDA_RECONSTRUCT_NO, QUDA_SINGLE_PRECISION, QUDA_SPACE_SPIN_COLOR_FIELD_ORDER, QUDA_STAGGERED_DSLASH, QUDA_SU3_LINKS, QUDA_SUMMARIZE, QUDA_ZERO_FIELD_CREATE, QudaGaugeParam_s::reconstruct, QudaGaugeParam_s::reconstruct_sloppy, QudaGaugeParam_s::scale, setDims(), quda::setDiracParam(), quda::setKernelPackT(), setSpinorSiteSize(), setVerbosity(), quda::ColorSpinorParam::siteOrder, quda::LatticeFieldParam::siteSubset, QudaInvertParam_s::solution_type, quda::cpuColorSpinorField::Source(), QudaInvertParam_s::sp_pad, spinor, spinorOut, spinorRef, QudaGaugeParam_s::t_boundary, QudaGaugeParam_s::tadpole_coeff, tdim, test_type, tmp, quda::DiracParam::tmp1, tmpCpu, transfer, QudaGaugeParam_s::type, V, QudaGaugeParam_s::X, quda::LatticeFieldParam::x, X, xdim, ydim, and zdim.

Referenced by StaggeredDslashTest::SetUp().

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

◆ INSTANTIATE_TEST_CASE_P()

INSTANTIATE_TEST_CASE_P ( QUDA  ,
StaggeredDslashTest  ,
Combine(Range(0, 3), ::testing::Values(QUDA_RECONSTRUCT_NO, QUDA_RECONSTRUCT_12, QUDA_RECONSTRUCT_8), ::testing::Values(0))  ,
getstaggereddslashtestname   
)

◆ main()

int main ( int  argc,
char **  argv 
)

◆ staggeredDslashRef()

void staggeredDslashRef ( )

◆ TEST_P() [1/2]

TEST_P ( StaggeredDslashTest  ,
verify   
)

◆ TEST_P() [2/2]

TEST_P ( StaggeredDslashTest  ,
benchmark   
)

◆ usage()

void usage ( char **  argv)

Definition at line 1693 of file test_util.cpp.

Referenced by main().

Here is the caller graph for this function:

◆ usage_extra()

void usage_extra ( char **  argv)

Definition at line 460 of file staggered_dslash_ctest.cpp.

References printfQuda, and return().

Here is the call graph for this function:

Variable Documentation

◆ cpuFat

cpuGaugeField* cpuFat = NULL

Definition at line 38 of file staggered_dslash_ctest.cpp.

Referenced by end(), and init().

◆ cpuLong

cpuGaugeField* cpuLong = NULL

Definition at line 39 of file staggered_dslash_ctest.cpp.

Referenced by end(), and init().

◆ cudaSpinor

cudaColorSpinorField* cudaSpinor

Definition at line 42 of file staggered_dslash_ctest.cpp.

Referenced by dslashCUDA(), end(), init(), and TEST_P().

◆ cudaSpinorOut

cudaColorSpinorField * cudaSpinorOut

Definition at line 42 of file staggered_dslash_ctest.cpp.

Referenced by dslashCUDA(), end(), init(), and TEST_P().

◆ dagger

QudaDagType dagger

Definition at line 960 of file deg_tm_dslash_cuda_gen.py.

Referenced by display_test_info(), init(), and staggeredDslashRef().

◆ device

int device

Definition at line 2238 of file CMakeCUDACompilerId.cpp1.ii.

Referenced by StaggeredDslashTest::SetUpTestCase().

◆ dirac

Dirac* dirac

Definition at line 73 of file staggered_dslash_ctest.cpp.

Referenced by dslashCUDA(), end(), init(), and TEST_P().

◆ dslash_type

QudaDslashType dslash_type

Definition at line 1626 of file test_util.cpp.

Referenced by init().

◆ fatlink

void* fatlink[4]

◆ gaugeParam

QudaGaugeParam gaugeParam

Definition at line 35 of file staggered_dslash_ctest.cpp.

Referenced by init(), and staggeredDslashRef().

◆ gridsize_from_cmdline

int gridsize_from_cmdline[]

For MPI, the default node mapping is lexicographical with t varying fastest.

Definition at line 50 of file test_util.cpp.

Referenced by main().

◆ hostGauge

void* hostGauge[4]

Definition at line 46 of file staggered_dslash_ctest.cpp.

◆ inv_param

QudaInvertParam inv_param

Definition at line 36 of file staggered_dslash_ctest.cpp.

Referenced by init(), staggeredDslashRef(), and TEST_P().

◆ kernel_pack_t

bool kernel_pack_t

Definition at line 1650 of file test_util.cpp.

Referenced by init().

◆ longlink

void * longlink[4]

◆ mass

double mass

Definition at line 1642 of file test_util.cpp.

Referenced by init(), and staggeredDslashRef().

◆ niter

int niter

Definition at line 1630 of file test_util.cpp.

Referenced by dslashCUDA(), and TEST_P().

◆ Nsrc

int Nsrc

Definition at line 1628 of file test_util.cpp.

Referenced by init().

◆ parity

Definition at line 53 of file staggered_dslash_ctest.cpp.

Referenced by dslashCUDA(), and staggeredDslashRef().

◆ prec_str

const char* prec_str[] = {"half", "single", "double"}

Definition at line 75 of file staggered_dslash_ctest.cpp.

Referenced by getstaggereddslashtestname().

◆ recon_str

const char* recon_str[] = {"r18", "r13", "r9"}

Definition at line 76 of file staggered_dslash_ctest.cpp.

◆ spinor

Definition at line 41 of file staggered_dslash_ctest.cpp.

Referenced by end(), init(), and staggeredDslashRef().

◆ spinorOut

cpuColorSpinorField * spinorOut

Definition at line 41 of file staggered_dslash_ctest.cpp.

Referenced by end(), init(), and TEST_P().

◆ spinorRef

cpuColorSpinorField * spinorRef

Definition at line 41 of file staggered_dslash_ctest.cpp.

Referenced by end(), init(), staggeredDslashRef(), and TEST_P().

◆ tdim

int tdim

Definition at line 1623 of file test_util.cpp.

Referenced by display_test_info(), and init().

◆ test_type

int test_type

Definition at line 1634 of file test_util.cpp.

Referenced by display_test_info(), dslashCUDA(), init(), and staggeredDslashRef().

◆ tmp

Definition at line 44 of file staggered_dslash_ctest.cpp.

Referenced by end(), and init().

◆ tmpCpu

Definition at line 41 of file staggered_dslash_ctest.cpp.

Referenced by end(), init(), and staggeredDslashRef().

◆ transfer

int transfer = 0

Definition at line 55 of file staggered_dslash_ctest.cpp.

Referenced by dslashCUDA(), end(), init(), and TEST_P().

◆ verify_results

bool verify_results

Definition at line 1641 of file test_util.cpp.

◆ X

int X[4]

Definition at line 70 of file staggered_dslash_ctest.cpp.

Referenced by init().

◆ xdim

int xdim

Definition at line 1620 of file test_util.cpp.

Referenced by display_test_info(), and init().

◆ ydim

int ydim

Definition at line 1621 of file test_util.cpp.

Referenced by display_test_info(), and init().

◆ zdim

int zdim

Definition at line 1622 of file test_util.cpp.

Referenced by display_test_info(), and init().