44 #ifndef AMESOS2_TACHO_DECL_HPP
45 #define AMESOS2_TACHO_DECL_HPP
48 #include "Amesos2_SolverCore.hpp"
49 #include "Amesos2_Tacho_FunctionMap.hpp"
52 #include "Tacho_Solver.hpp"
63 template <
class Matrix,
79 typedef typename super_type::scalar_type scalar_type;
80 typedef typename super_type::local_ordinal_type local_ordinal_type;
81 typedef typename super_type::global_size_type global_size_type;
90 typedef typename type_map::type tacho_type;
91 typedef typename type_map::magnitude_type magnitude_type;
96 typedef Tacho::ordinal_type ordinal_type;
97 typedef Tacho::size_type size_type;
98 typedef Kokkos::DefaultHostExecutionSpace HostSpaceType;
99 typedef Kokkos::View<size_type*,HostSpaceType> size_type_array;
100 typedef Kokkos::View<ordinal_type*,HostSpaceType> ordinal_type_array;
101 typedef Kokkos::View<tacho_type*, HostSpaceType> value_type_array;
113 Teuchos::RCP<Vector> X,
114 Teuchos::RCP<const Vector> B);
163 int
solve_impl(const Teuchos::Ptr<MultiVecAdapter<Vector> > X,
164 const Teuchos::Ptr<const MultiVecAdapter<Vector> > B) const;
175 void setParameters_impl(
176 const Teuchos::RCP<Teuchos::ParameterList> & parameterList );
205 mutable struct TACHOData {
206 typename Tacho::Solver<tacho_type,HostSpaceType> solver;
222 #ifdef KOKKOS_ENABLE_OPENMP
223 typedef Kokkos::OpenMP DeviceSpaceType;
225 typedef Kokkos::Serial DeviceSpaceType;
227 typedef typename Tacho::Solver<tacho_type,DeviceSpaceType>::value_type_matrix
231 mutable solve_array_t workspace_;
238 #ifdef HAVE_TEUCHOS_COMPLEX
239 typedef Meta::make_list4<float,
245 typedef Meta::make_list2<float,
253 #endif // AMESOS2_TACHO_DECL_HPP
Amesos2::SolverCore: A templated interface for interaction with third-party direct sparse solvers...
Definition: Amesos2_SolverCore_decl.hpp:105
Amesos2 interface to the Tacho package.
Definition: Amesos2_Tacho_decl.hpp:65
int symbolicFactorization_impl()
Perform symbolic factorization of the matrix using Tacho.
Definition: Amesos2_Tacho_def.hpp:93
Map types to solver-specific data-types and enums.
Definition: Amesos2_TypeMap.hpp:82
Teuchos::Array< size_type > rowptr_
Stores the row indices of the nonzero entries.
Definition: Amesos2_Tacho_decl.hpp:219
std::string description() const
Returns a short description of this Solver.
Definition: Amesos2_Tacho_def.hpp:77
std::string name() const
Return the name of this solver.
Definition: Amesos2_SolverCore_def.hpp:509
Provides traits about solvers.
Definition: Amesos2_SolverTraits.hpp:70
Teuchos::Array< ordinal_type > colind_
Stores the location in Ai_ and Aval_ that starts row j.
Definition: Amesos2_Tacho_decl.hpp:217
bool matrixShapeOK_impl() const
Determines whether the shape of the matrix is OK for this solver.
Definition: Amesos2_Tacho_def.hpp:267
int numericFactorization_impl()
Tacho specific numeric factorization.
Definition: Amesos2_Tacho_def.hpp:168
Teuchos::Array< tacho_type > nzvals_
Stores the values of the nonzero entries for Tacho.
Definition: Amesos2_Tacho_decl.hpp:215
int preOrdering_impl()
Performs pre-ordering on the matrix to increase efficiency.
Definition: Amesos2_Tacho_def.hpp:86
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters_impl() const
Definition: Amesos2_Tacho_def.hpp:288
Interface to Amesos2 solver objects.
Definition: Amesos2_Solver_decl.hpp:78
Passes functions to TPL functions based on type.
Definition: Amesos2_FunctionMap.hpp:76
int solve_impl(const Teuchos::Ptr< MultiVecAdapter< Vector > > X, const Teuchos::Ptr< const MultiVecAdapter< Vector > > B) const
Tacho specific solve.
Definition: Amesos2_Tacho_def.hpp:198
Provides access to interesting solver traits.
bool loadA_impl(EPhase current_phase)
Reads matrix data into internal structures.
Definition: Amesos2_Tacho_def.hpp:313
bool do_optimization() const
can we optimize size_type and ordinal_type for straight pass through
Definition: Amesos2_Tacho_def.hpp:307