12 #include <type_traits> 
   22 #include "Sacado_mpl_apply.hpp" 
   24 template <
typename uq_type, 
typename expr_type>
 
   26   using Sacado::Promote;
 
   29   typedef typename Sacado::ValueType<uq_type>::type 
value_type;
 
   30   typedef typename Sacado::ScalarType<uq_type>::type 
scalar_type;
 
   33     is_same<
typename Promote<uq_type,uq_type>::type, uq_type >::
value,
 
   34     "Promote<uq_type,uq_type>::type != uq_type");
 
   37     is_same<
typename Promote<uq_type,value_type>::type, uq_type >::
value,
 
   38     "Promote<uq_type,value_type>::type != uq_type");
 
   41     is_same<
typename Promote<value_type,uq_type>::type, uq_type >::
value,
 
   42     "Promote<value_type,uq_type>::type != uq_type");
 
   45     is_same<
typename Promote<uq_type,scalar_type>::type, uq_type >::
value,
 
   46     "Promote<uq_type,scalar_type>::type != uq_type");
 
   49     is_same<
typename Promote<scalar_type,uq_type>::type, uq_type >::
value,
 
   50     "Promote<scalar_type,uq_type>::type != uq_type");
 
   53     is_same<
typename Promote<uq_type,expr_type>::type, uq_type >::
value,
 
   54     "Promote<expr_type,uq_type>::type != uq_type");
 
   57     is_same<
typename Promote<expr_type,uq_type>::type, uq_type >::
value,
 
   58     "Promote<expr_type,uq_type>::type != uq_type");
 
   61     is_same<
typename Promote<scalar_type,expr_type>::type, uq_type >::
value,
 
   62     "Promote<scalar_type,uq_type>::type != uq_type");
 
   65     is_same<
typename Promote<expr_type,scalar_type>::type, uq_type >::
value,
 
   66     "Promote<expr_type,scalar_type>::type != uq_type");
 
   69     is_same<
typename Promote<value_type,expr_type>::type, uq_type >::
value,
 
   70     "Promote<value_type,uq_type>::type != uq_type");
 
   73     is_same<
typename Promote<expr_type,value_type>::type, uq_type >::
value,
 
   74     "Promote<expr_type,value_type>::type != uq_type");
 
   81 template <
typename uq_type, 
typename expr1_type, 
typename expr2_type>
 
   83   using Sacado::Promote;
 
   87     is_same<
typename Promote<expr1_type,expr2_type>::type, uq_type >::
value,
 
   88     "Promote<expr1_type,expr2_type>::type != uq_type");
 
   95 template <
typename uq_type>
 
  101   typedef decltype(std::declval<uq_type>()*std::declval<uq_type>()) bi_expr_type;
 
  102   bool res1 = testUQExprPromote<uq_type,bi_expr_type>();
 
  107   typedef decltype(-std::declval<uq_type>()) un_expr_type;
 
  108   bool res2 = testUQExprPromote<uq_type,un_expr_type>();
 
  110   bool res3 = testUQExprPromote2<uq_type,bi_expr_type,un_expr_type>();
 
  112   return res1 && res2 && res3;
 
  115 template <
typename uq_type>
 
  117   using Sacado::Promote;
 
  119   typedef Sacado::Fad::DFad<uq_type> fad_uq_type;
 
  121   bool res1 = testUQPromote<uq_type>();
 
  122   bool res2 = testUQPromote<fad_uq_type>();
 
  124   typedef decltype(std::declval<uq_type>()*std::declval<uq_type>()) uq_expr_type;
 
  125   typedef decltype(-std::declval<fad_uq_type>()) fad_uq_expr_type;
 
  127     is_same<
typename Promote<uq_expr_type,fad_uq_expr_type>::type, fad_uq_type >::
value,
 
  128     "Promote<uq_expr_type,fad_uq_expr_type>::type != fad_uq_type");
 
  135   success = testPromote<UQ>();
 
  138 typedef Kokkos::DefaultExecutionSpace 
device;
 
  140 #ifdef HAVE_STOKHOS_PCE_SCALAR_TYPE 
  151 typedef Sacado::ETPCE::OrthogPoly<
double,
storage_type> et_orthog_poly_type;
 
  152 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Promote, Promote, et_orthog_poly_type )
 
  157 typedef Stokhos::DynamicStorage<
int,
double,
device> dynamic_storage_type;
 
  158 typedef Sacado::UQ::PCE<dynamic_storage_type> kokkos_pce_type;
 
  159 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Promote, Promote, kokkos_pce_type )
 
  162 #ifdef HAVE_STOKHOS_ENSEMBLE_SCALAR_TYPE 
Stokhos::StandardStorage< int, double > storage_type
 
Statically allocated storage class. 
 
static int runUnitTestsFromMain(int argc, char *argv[])
 
int main(int argc, char **argv)
 
TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL(Kokkos_CrsMatrix_MP, ReplaceValues, MatrixScalar)
 
SparseArrayIterator< index_iterator, value_iterator >::value_reference value(const SparseArrayIterator< index_iterator, value_iterator > &it)
 
#define TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT(TEST_GROUP, TEST_NAME, TYPE)