|
Amesos2 - Direct Sparse Solver Interfaces Version of the Day
|
Scales a 1-D representation of a multivector. More...
#include <Amesos2_Util.hpp>
Static Public Member Functions | |
| static void | do_get (const Teuchos::Ptr< const M > mat, KV_S &nzvals, KV_GO &indices, KV_GS &pointers, typename KV_GS::value_type &nnz, const Teuchos::Ptr< const Tpetra::Map< typename M::local_ordinal_t, typename M::global_ordinal_t, typename M::node_t > > map, EDistribution distribution, EStorage_Ordering ordering) |
Scales a 1-D representation of a multivector.
| [in/out] | vals The values of the multi-vector. On exit will contain the scaled values. | |
| [in] | l | The length of each vector in the multivector |
| [in] | ld | The leading dimension of the multivector |
| [in] | s | Contains the scaling factors of the diagonal scaling matrix |
Scales each vector by diag(s), with the scaling multiplication being performed by the `binary_op' parameter. BinaryOp is some class that defines a operator() method as
*/ template <typename Scalar1, typename Scalar2, class BinaryOp> void scale(ArrayView<Scalar1> vals, size_t l, size_t ld, ArrayView<Scalar2> s, BinaryOp binary_op);
/ Prints a line of 70 "-"s on std::cout. void printLine( Teuchos::FancyOStream &out );
Helper function used to convert Kokkos::complex pointer to std::complex pointer; needed for optimized code path when retrieving the CRS raw pointers template < class T0, class T1 > struct getStdCplxType { using common_type = typename std::common_type<T0,T1>::type; using type = common_type; };
template < class T0, class T1 > struct getStdCplxType< T0, T1* > { using common_type = typename std::common_type<T0,T1>::type; using type = common_type; };
//////////////////////////////// Matrix/MultiVector Utilities // ////////////////////////////////
/**
A generic base class for the CRS and CCS helpers.
S, GO, and GS are the desired types. They are also the types of the respective input parameters. Matrix is expected to be an Amesos2 MatrixAdapter type.
The Op template parameter is a function-like class that provides a static apply() function.