1313using namespace mpart ;
1414
1515
16- template <typename MemorySpace, typename PosFuncType>
16+ template <typename MemorySpace, typename PosFuncType, bool isCompact >
1717std::shared_ptr<ConditionalMapBase<MemorySpace>> CreateComponentImpl_Phys_ACC (FixedMultiIndexSet<MemorySpace> const & mset, MapOptions opts)
1818{
1919 BasisEvaluator<BasisHomogeneity::Homogeneous,PhysicistHermite> basis1d (opts.basisNorm );
@@ -24,27 +24,38 @@ std::shared_ptr<ConditionalMapBase<MemorySpace>> CreateComponentImpl_Phys_ACC(Fi
2424 MultivariateExpansionWorker<BasisEvaluator<BasisHomogeneity::Homogeneous,PhysicistHermite>,MemorySpace> expansion (mset, basis1d);
2525 std::shared_ptr<ConditionalMapBase<MemorySpace>> output;
2626
27- output = std::make_shared<MonotoneComponent<decltype (expansion), PosFuncType, decltype (quad), MemorySpace>>(expansion, quad, opts.contDeriv , opts.nugget );
27+ output = std::make_shared<MonotoneComponent<decltype (expansion), PosFuncType, decltype (quad), MemorySpace, isCompact >>(expansion, quad, opts.contDeriv , opts.nugget );
2828
2929 Kokkos::View<const double *, MemorySpace> coeffs = Kokkos::View<double *,MemorySpace>(" Component Coefficients" , mset.Size ());
3030 output->SetCoeffs (coeffs);
3131 return output;
3232}
3333
34- static auto reg_host_phys_acc_exp = mpart::MapFactory::CompFactoryImpl<Kokkos::HostSpace>::GetFactoryMap()->insert (std::make_pair(std::make_tuple(BasisTypes::PhysicistHermite, false , PosFuncTypes::Exp, QuadTypes::AdaptiveClenshawCurtis), CreateComponentImpl_Phys_ACC<Kokkos::HostSpace, Exp>));
35- static auto reg_host_phys_acc_splus = mpart::MapFactory::CompFactoryImpl<Kokkos::HostSpace>::GetFactoryMap()->insert (std::make_pair(std::make_tuple(BasisTypes::PhysicistHermite, false , PosFuncTypes::SoftPlus, QuadTypes::AdaptiveClenshawCurtis), CreateComponentImpl_Phys_ACC<Kokkos::HostSpace, SoftPlus>));
34+ static auto reg_host_phys_acc_exp = mpart::MapFactory::CompFactoryImpl<Kokkos::HostSpace>::GetFactoryMap()->insert (std::make_pair(std::make_tuple(BasisTypes::PhysicistHermite, false , PosFuncTypes::Exp, QuadTypes::AdaptiveClenshawCurtis, false ), CreateComponentImpl_Phys_ACC<Kokkos::HostSpace, Exp, false >));
35+ static auto reg_host_phys_acc_splus = mpart::MapFactory::CompFactoryImpl<Kokkos::HostSpace>::GetFactoryMap()->insert (std::make_pair(std::make_tuple(BasisTypes::PhysicistHermite, false , PosFuncTypes::SoftPlus, QuadTypes::AdaptiveClenshawCurtis, false ), CreateComponentImpl_Phys_ACC<Kokkos::HostSpace, SoftPlus, false >));
3636#if defined(MPART_ENABLE_GPU)
37- static auto reg_device_phys_acc_exp = mpart::MapFactory::CompFactoryImpl<mpart::DeviceSpace>::GetFactoryMap()->insert (std::make_pair(std::make_tuple(BasisTypes::PhysicistHermite, false , PosFuncTypes::Exp, QuadTypes::AdaptiveClenshawCurtis), CreateComponentImpl_Phys_ACC<mpart::DeviceSpace, Exp>));
38- static auto reg_device_phys_acc_splus = mpart::MapFactory::CompFactoryImpl<mpart::DeviceSpace>::GetFactoryMap()->insert (std::make_pair(std::make_tuple(BasisTypes::PhysicistHermite, false , PosFuncTypes::SoftPlus, QuadTypes::AdaptiveClenshawCurtis), CreateComponentImpl_Phys_ACC<mpart::DeviceSpace, SoftPlus>));
37+ static auto reg_device_phys_acc_exp = mpart::MapFactory::CompFactoryImpl<mpart::DeviceSpace>::GetFactoryMap()->insert (std::make_pair(std::make_tuple(BasisTypes::PhysicistHermite, false , PosFuncTypes::Exp, QuadTypes::AdaptiveClenshawCurtis, false ), CreateComponentImpl_Phys_ACC<mpart::DeviceSpace, Exp, false>));
38+ static auto reg_device_phys_acc_splus = mpart::MapFactory::CompFactoryImpl<mpart::DeviceSpace>::GetFactoryMap()->insert (std::make_pair(std::make_tuple(BasisTypes::PhysicistHermite, false , PosFuncTypes::SoftPlus, QuadTypes::AdaptiveClenshawCurtis, false ), CreateComponentImpl_Phys_ACC<mpart::DeviceSpace, SoftPlus, false>));
39+ #endif
40+
41+ static auto reg_host_phys_acc_exp_compact = mpart::MapFactory::CompFactoryImpl<Kokkos::HostSpace>::GetFactoryMap()->insert (std::make_pair(std::make_tuple(BasisTypes::PhysicistHermite, false , PosFuncTypes::Exp, QuadTypes::AdaptiveClenshawCurtis, true ), CreateComponentImpl_Phys_ACC<Kokkos::HostSpace, Exp, true>));
42+ static auto reg_host_phys_acc_splus_compact = mpart::MapFactory::CompFactoryImpl<Kokkos::HostSpace>::GetFactoryMap()->insert (std::make_pair(std::make_tuple(BasisTypes::PhysicistHermite, false , PosFuncTypes::SoftPlus, QuadTypes::AdaptiveClenshawCurtis, true ), CreateComponentImpl_Phys_ACC<Kokkos::HostSpace, SoftPlus, true>));
43+ #if defined(MPART_ENABLE_GPU)
44+ static auto reg_device_phys_acc_exp_compact = mpart::MapFactory::CompFactoryImpl<mpart::DeviceSpace>::GetFactoryMap()->insert (std::make_pair(std::make_tuple(BasisTypes::PhysicistHermite, false , PosFuncTypes::Exp, QuadTypes::AdaptiveClenshawCurtis, true ), CreateComponentImpl_Phys_ACC<mpart::DeviceSpace, Exp, true>));
45+ static auto reg_device_phys_acc_splus_compact = mpart::MapFactory::CompFactoryImpl<mpart::DeviceSpace>::GetFactoryMap()->insert (std::make_pair(std::make_tuple(BasisTypes::PhysicistHermite, false , PosFuncTypes::SoftPlus, QuadTypes::AdaptiveClenshawCurtis, true ), CreateComponentImpl_Phys_ACC<mpart::DeviceSpace, SoftPlus, true>));
3946#endif
4047
4148#if defined(MPART_HAS_CEREAL)
42- REGISTER_MONO_COMP (BasisHomogeneity::Homogeneous, PhysicistHermite, Exp, AdaptiveClenshawCurtis, Kokkos::HostSpace)
43- REGISTER_MONO_COMP (BasisHomogeneity::Homogeneous, PhysicistHermite, SoftPlus, AdaptiveClenshawCurtis, Kokkos::HostSpace)
49+ REGISTER_HOMOGENEOUS_MONO_COMP (PhysicistHermite, Exp, AdaptiveClenshawCurtis, Kokkos::HostSpace, false )
50+ REGISTER_HOMOGENEOUS_MONO_COMP (PhysicistHermite, SoftPlus, AdaptiveClenshawCurtis, Kokkos::HostSpace, false )
51+ REGISTER_HOMOGENEOUS_MONO_COMP (PhysicistHermite, Exp, AdaptiveClenshawCurtis, Kokkos::HostSpace, true )
52+ REGISTER_HOMOGENEOUS_MONO_COMP (PhysicistHermite, SoftPlus, AdaptiveClenshawCurtis, Kokkos::HostSpace, true )
4453#if defined(MPART_ENABLE_GPU)
45- REGISTER_MONO_COMP (BasisHomogeneity::Homogeneous, PhysicistHermite, Exp, AdaptiveClenshawCurtis, mpart::DeviceSpace)
46- REGISTER_MONO_COMP (BasisHomogeneity::Homogeneous, PhysicistHermite, SoftPlus, AdaptiveClenshawCurtis, mpart::DeviceSpace)
47- #endif
54+ REGISTER_HOMOGENEOUS_MONO_COMP (PhysicistHermite, Exp, AdaptiveClenshawCurtis, mpart::DeviceSpace, false )
55+ REGISTER_HOMOGENEOUS_MONO_COMP (PhysicistHermite, SoftPlus, AdaptiveClenshawCurtis, mpart::DeviceSpace, false )
56+ REGISTER_HOMOGENEOUS_MONO_COMP (PhysicistHermite, Exp, AdaptiveClenshawCurtis, mpart::DeviceSpace, true )
57+ REGISTER_HOMOGENEOUS_MONO_COMP (PhysicistHermite, SoftPlus, AdaptiveClenshawCurtis, mpart::DeviceSpace, true )
58+ #endif
4859
4960CEREAL_REGISTER_DYNAMIC_INIT (mpartInitMapFactory1)
5061#endif
0 commit comments