46 #include "Kokkos_Core.hpp" 
   50 template <
typename scalar, 
typename device>
 
   51 int mainHost(
bool test_flat, 
bool test_orig, 
bool test_deg, 
bool test_lin,
 
   52              bool test_block, 
bool symmetric, 
bool mkl);
 
   54 template <
typename scalar>
 
   55 int mainCuda(
bool test_flat, 
bool test_orig, 
bool test_lin,
 
   56              bool test_block, 
bool symmetric, 
int device_id);
 
   61   bool test_host = 
true;
 
   62 #ifdef KOKKOS_ENABLE_CUDA 
   63   bool test_cuda = 
true;
 
   66   bool test_block = 
true;
 
   67   bool test_flat = 
true;
 
   68   bool test_orig = 
true;
 
   69   bool test_deg = 
false;
 
   70   bool test_lin = 
false;
 
   71   bool symmetric = 
true;
 
   74 #ifdef KOKKOS_ENABLE_SERIAL 
   77 #ifdef KOKKOS_ENABLE_OPENMP 
   80 #ifdef KOKKOS_ENABLE_THREADS 
   85   bool print_usage = 
false;
 
   88     std::string s(argv[i]);
 
   91     else if (s == 
"no-host")
 
   93 #ifdef KOKKOS_ENABLE_CUDA 
   96     else if (s == 
"no-cuda")
 
   98     else if (s == 
"device") {
 
  100       device = std::atoi(argv[i]);
 
  103     else if (s == 
"block")
 
  105     else if (s == 
"no-block")
 
  107     else if (s == 
"flat")
 
  109     else if (s == 
"no-flat")
 
  111     else if (s == 
"orig")
 
  113     else if (s == 
"no-orig")
 
  117     else if (s == 
"no-deg")
 
  119     else if (s == 
"linear")
 
  121     else if (s == 
"no-linear")
 
  123     else if (s == 
"symmetric")
 
  125     else if (s == 
"no-symmetric")
 
  129     else if (s == 
"no-mkl")
 
  131     else if (s == 
"single")
 
  133     else if (s == 
"double")
 
  135 #ifdef KOKKOS_ENABLE_SERIAL 
  136     else if (s == 
"serial")
 
  138     else if (s == 
"no-serial")
 
  141 #ifdef KOKKOS_ENABLE_OPENMP 
  144     else if (s == 
"no-omp")
 
  147 #ifdef KOKKOS_ENABLE_THREADS 
  148     else if (s == 
"threads")
 
  150     else if (s == 
"no-threads")
 
  153     else if (s == 
"-h" || s == 
"--help")
 
  156       std::cout << 
"Invalid argument:  " << s << std::endl;
 
  162     std::cout << 
"Usage:" << std::endl
 
  164               << 
" [no-][cuda|host|serial|omp|threads|block|flat|orig|deg|linear|symmetric] [single|double] [device device_id]" 
  165               << std::endl << 
"Defaults are all enabled." << std::endl;
 
  171 #ifdef KOKKOS_ENABLE_SERIAL 
  174         mainHost<float,Kokkos::Serial>(
 
  175           test_flat, test_orig, test_deg, test_lin, test_block, symmetric, mkl);
 
  177         mainHost<double,Kokkos::Serial>(
 
  178           test_flat, test_orig, test_deg, test_lin, test_block, symmetric, mkl);
 
  182 #ifdef KOKKOS_ENABLE_THREADS 
  185         mainHost<float,Kokkos::Threads>(
 
  186           test_flat, test_orig, test_deg, test_lin, test_block, symmetric, mkl);
 
  188         mainHost<double,Kokkos::Threads>(
 
  189           test_flat, test_orig, test_deg, test_lin, test_block, symmetric, mkl);
 
  193 #ifdef KOKKOS_ENABLE_OPENMP 
  196         mainHost<float,Kokkos::OpenMP>(
 
  197           test_flat, test_orig, test_deg, test_lin, test_block, symmetric, mkl);
 
  199         mainHost<double,Kokkos::OpenMP>(
 
  200           test_flat, test_orig, test_deg, test_lin, test_block, symmetric, mkl);
 
  206 #ifdef KOKKOS_ENABLE_CUDA 
void mainHost(const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const int use_print, const int use_trials, const int use_nodes[], const bool check, Kokkos::Example::FENL::DeviceConfig dev_config)
void mainCuda(const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const int use_print, const int use_trials, const int use_nodes[], const bool check, Kokkos::Example::FENL::DeviceConfig dev_config)
int main(int argc, char **argv)
template int mainCuda< double >(bool, bool, bool, bool, bool, int)
template int mainCuda< float >(bool, bool, bool, bool, bool, int)