Tpetra parallel linear algebra Version of the Day
Loading...
Searching...
No Matches
Tpetra_leftAndOrRightScaleCrsMatrix_decl.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Tpetra: Templated Linear Algebra Services Package
4//
5// Copyright 2008 NTESS and the Tpetra contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef TPETRA_LEFTANDORRIGHTSCALECRSMATRIX_DECL_HPP
11#define TPETRA_LEFTANDORRIGHTSCALECRSMATRIX_DECL_HPP
12
15
16#include "TpetraCore_config.h"
17#include "Kokkos_ArithTraits.hpp"
18#include "Kokkos_Core.hpp"
20#include "Tpetra_Vector_fwd.hpp"
21
22namespace Tpetra {
23
29 SCALING_MULTIPLY,
30 SCALING_DIVIDE
31};
32
59template<class SC, class LO, class GO, class NT>
60void
62 const Kokkos::View<
63 const typename Kokkos::ArithTraits<SC>::mag_type*,
64 typename NT::device_type>& rowScalingFactors,
65 const Kokkos::View<
66 const typename Kokkos::ArithTraits<SC>::mag_type*,
67 typename NT::device_type>& colScalingFactors,
68 const bool leftScale,
69 const bool rightScale,
70 const bool assumeSymmetric,
71 const EScaling scaling);
72
100template<class SC, class LO, class GO, class NT>
101void
103 const Tpetra::Vector<typename Kokkos::ArithTraits<SC>::mag_type,
104 LO, GO, NT>& rowScalingFactors,
105 const Tpetra::Vector<typename Kokkos::ArithTraits<SC>::mag_type,
106 LO, GO, NT>& colScalingFactors,
107 const bool leftScale,
108 const bool rightScale,
109 const bool assumeSymmetric,
110 const EScaling scaling);
111
112} // namespace Tpetra
113
114#endif // TPETRA_LEFTANDORRIGHTSCALECRSMATRIX_DECL_HPP
Forward declaration of Tpetra::CrsMatrix.
Forward declaration of Tpetra::Vector.
Sparse matrix that presents a row-oriented interface that lets users read or modify entries.
A distributed dense vector.
Namespace Tpetra contains the class and methods constituting the Tpetra library.
EScaling
Whether "scaling" a matrix means multiplying or dividing its entries.
void leftAndOrRightScaleCrsMatrix(Tpetra::CrsMatrix< SC, LO, GO, NT > &A, const Kokkos::View< const typename Kokkos::ArithTraits< SC >::mag_type *, typename NT::device_type > &rowScalingFactors, const Kokkos::View< const typename Kokkos::ArithTraits< SC >::mag_type *, typename NT::device_type > &colScalingFactors, const bool leftScale, const bool rightScale, const bool assumeSymmetric, const EScaling scaling)
Left-scale and/or right-scale (in that order) the entries of the input Tpetra::CrsMatrix A.