11 const char *
prec_str[] = {
"quarter",
"half",
"single",
"double"};
22 printfQuda(
"prec recon test_type matpc_type dagger S_dim T_dimension Ls_dimension dslash_type niter\n");
23 printfQuda(
"%6s %2s %s %12s %d %3d/%3d/%3d %3d %2d %14s %d\n",
43 using ::testing::TestWithParam;
52 ::testing::tuple<int, int, int>
param;
58 if ((QUDA_PRECISION &
getPrecision(::testing::get<0>(GetParam()))) == 0
64 && (::testing::get<0>(GetParam()) == 2 || ::testing::get<0>(GetParam()) == 3)) {
65 warningQuda(
"Only fixed precision supported for MatPCDagMatPCLocal operator, skipping...");
77 int prec = ::testing::get<0>(GetParam());
82 int value = ::testing::get<2>(GetParam());
83 for(
int j=0; j < 4;j++){
84 if (value & (1 << j)){
125 ASSERT_LE(deviation,
tol) <<
"CPU and CUDA implementations do not agree";
130 int main(
int argc,
char **argv)
142 app->parse(argc, argv);
143 }
catch (
const CLI::ParseError &e) {
170 const int prec = ::testing::get<0>(
param.param);
171 const int recon = ::testing::get<1>(
param.param);
172 const int part = ::testing::get<2>(
param.param);
173 std::stringstream ss;
178 ss <<
"_partition" << part;
double benchmark(Kernel kernel, const int niter)
static void SetUpTestCase()
::testing::tuple< int, int, int > param
static void TearDownTestCase()
TestEventListener * Release(TestEventListener *listener)
TestEventListener * default_result_printer() const
TestEventListeners & listeners()
static UnitTest * GetInstance()
void commDimPartitionedReset()
Reset the comm dim partioned array to zero,.
void commDimPartitionedSet(int dir)
std::shared_ptr< QUDAApp > make_app(std::string app_description, std::string app_name)
QudaReconstructType link_recon
std::array< int, 4 > grid_partition
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)
INSTANTIATE_TEST_SUITE_P(QUDA, DslashTest, Combine(Range(0, 4), ::testing::Values(QUDA_RECONSTRUCT_NO, QUDA_RECONSTRUCT_12, QUDA_RECONSTRUCT_8), ::testing::Values(0)), getdslashtestname)
std::string getdslashtestname(testing::TestParamInfo<::testing::tuple< int, int, int >> param)
int main(int argc, char **argv)
DslashTestWrapper dslash_test_wrapper
void display_test_info(int precision, QudaReconstructType link_recon)
TEST_P(DslashTest, verify)
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_matpc_str(QudaMatPCType type)
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.
void init_ctest(int argc, char **argv, int precision, QudaReconstructType link_recon)
dslash_test_type dtest_type
void run_test(int niter, bool print_metrics=false)
QudaGaugeParam gauge_param
QudaInvertParam inv_param
QudaReconstructType reconstruct