9 const char *
prec_str[] = {
"quarter",
"half",
"single",
"double"};
23 printfQuda(
"prec recon test_type dagger S_dim T_dimension\n");
31 using ::testing::TestWithParam;
37 ::testing::tuple<int, int, int>
param;
43 if ((QUDA_PRECISION &
getPrecision(::testing::get<0>(GetParam()))) == 0
49 && (::testing::get<0>(GetParam()) == 0 || ::testing::get<0>(GetParam()) == 1)) {
50 warningQuda(
"Fixed precision unsupported in fat/long compute, skipping...");
55 warningQuda(
"Reconstruct 9 unsupported in fat/long compute, skipping...");
60 warningQuda(
"Fixed precision unsupported for Laplace operator, skipping...");
71 int prec = ::testing::get<0>(GetParam());
76 int value = ::testing::get<2>(GetParam());
77 for(
int j=0; j < 4;j++){
78 if (value & (1 << j)){
105 double deviation = 1.0;
113 ASSERT_LE(deviation,
tol) <<
"CPU and CUDA implementations do not agree";
118 int main(
int argc,
char **argv)
132 app->parse(argc, argv);
133 }
catch (
const CLI::ParseError &e) {
154 "Cannot load a gauge field and test the ASQTAD/HISQ operator without setting \"--compute-fat-long true\".\n");
163 printfQuda(
"Note: epsilon-naik != 0, testing epsilon correction links.\n");
166 printfQuda(
"Not computing fat-long, ignoring epsilon correction.\n");
169 printfQuda(
"Note: epsilon-naik = 0, testing original HISQ links.\n");
175 errorQuda(
"Test type %s is not supported for the Laplace operator.\n",
184 for (
int dir = 0; dir < 4; dir++) {
199 const int prec = ::testing::get<0>(
param.param);
200 const int recon = ::testing::get<1>(
param.param);
201 const int part = ::testing::get<2>(
param.param);
202 std::stringstream ss;
206 ss <<
"_partition" << part;
double benchmark(Kernel kernel, const int niter)
::testing::tuple< int, int, int > param
virtual ~StaggeredDslashTest()
static void SetUpTestCase()
static void TearDownTestCase()
TestEventListener * Release(TestEventListener *listener)
TestEventListener * default_result_printer() const
TestEventListeners & listeners()
static UnitTest * GetInstance()
void commDimPartitionedSet(int dir)
std::shared_ptr< QUDAApp > make_app(std::string app_description, std::string app_name)
QudaReconstructType link_recon
QudaDslashType dslash_type
void add_comms_option_group(std::shared_ptr< QUDAApp > quda_app)
std::array< int, 4 > gridsize_from_cmdline
std::string get_string(CLI::TransformPairs< T > &map, T val)
CLI::TransformPairs< dslash_test_type > dtest_type_map
enum QudaReconstructType_s QudaReconstructType
#define ASSERT_LE(val1, val2)
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_
void initComms(int argc, char **argv, std::array< int, 4 > &commDims)
int getReconstructNibble(QudaReconstructType recon)
double getTolerance(QudaPrecision prec)
QudaPrecision getPrecision(int i)
const char * get_prec_str(QudaPrecision prec)
const char * get_dslash_str(QudaDslashType type)
const char * get_recon_str(QudaReconstructType recon)
internal::ParamGenerator< T > Range(T start, T end, IncrementT step)
internal::CartesianProductHolder< Generator... > Combine(const Generator &... g)
internal::ValueArray< T... > Values(T... v)
internal::ParamGenerator< bool > Bool()
GTEST_API_ void InitGoogleTest(int *argc, char **argv)
void initQuda(int device)
void updateR()
update the radius for halos.
INSTANTIATE_TEST_SUITE_P(QUDA, StaggeredDslashTest, Combine(Range(0, 4), ::testing::Values(QUDA_RECONSTRUCT_NO, QUDA_RECONSTRUCT_12, QUDA_RECONSTRUCT_8), ::testing::Values(0)), getstaggereddslashtestname)
TEST_P(StaggeredDslashTest, verify)
int main(int argc, char **argv)
std::string getstaggereddslashtestname(testing::TestParamInfo<::testing::tuple< int, int, int >> param)
void display_test_info(int precision, QudaReconstructType link_recon)
StaggeredDslashTestWrapper dslash_test_wrapper
void init(int precision, QudaReconstructType link_recon, int partition)
dslash_test_type dtest_type
void run_test(int niter, bool print_metrics=false)
cpuColorSpinorField * spinorRef
void staggeredDslashRef()
void init_ctest(int precision, QudaReconstructType link_recon_, int partition)
QudaInvertParam inv_param