Skip to content

Commit

Permalink
More warnings fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jgfouca committed Sep 29, 2023
1 parent acdc8b8 commit b8638bd
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 33 deletions.
12 changes: 6 additions & 6 deletions packages/ifpack2/example/RelaxationWithEquilibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,7 @@ template<class ViewType1,
>::mag_type,
typename ViewType2::non_const_value_type
>::value,
const int rank = ViewType1::Rank>
const int rank = ViewType1::rank>
class ElementWiseMultiply {};

template<class ViewType1,
Expand All @@ -1157,7 +1157,7 @@ class ElementWiseMultiply<ViewType1,
takeAbsoluteValueOfScalingFactors,
1> {
public:
static_assert (ViewType1::Rank == 1, "ViewType1 must be a rank-1 "
static_assert (ViewType1::rank == 1, "ViewType1 must be a rank-1 "
"Kokkos::View in order to use this specialization.");

ElementWiseMultiply (const ViewType1& X,
Expand Down Expand Up @@ -1203,7 +1203,7 @@ class ElementWiseMultiply<ViewType1,
takeAbsoluteValueOfScalingFactors,
2> {
public:
static_assert (ViewType1::Rank == 2, "ViewType1 must be a rank-2 "
static_assert (ViewType1::rank == 2, "ViewType1 must be a rank-2 "
"Kokkos::View in order to use this specialization.");

ElementWiseMultiply (const ViewType1& X,
Expand Down Expand Up @@ -1340,7 +1340,7 @@ template<class ViewType1,
>::mag_type,
typename ViewType2::non_const_value_type
>::value,
const int rank = ViewType1::Rank>
const int rank = ViewType1::rank>
class ElementWiseDivide {};

template<class ViewType1,
Expand All @@ -1355,7 +1355,7 @@ class ElementWiseDivide<ViewType1,
takeAbsoluteValueOfScalingFactors,
1> {
public:
static_assert (ViewType1::Rank == 1, "ViewType1 must be a rank-1 "
static_assert (ViewType1::rank == 1, "ViewType1 must be a rank-1 "
"Kokkos::View in order to use this specialization.");

ElementWiseDivide (const ViewType1& X,
Expand Down Expand Up @@ -1401,7 +1401,7 @@ class ElementWiseDivide<ViewType1,
takeAbsoluteValueOfScalingFactors,
2> {
public:
static_assert (ViewType1::Rank == 2, "ViewType1 must be a rank-2 "
static_assert (ViewType1::rank == 2, "ViewType1 must be a rank-2 "
"Kokkos::View in order to use this specialization.");

ElementWiseDivide (const ViewType1& X,
Expand Down
3 changes: 0 additions & 3 deletions packages/ifpack2/src/Ifpack2_MDF_def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,6 @@ void MDF<MatrixType>::initialize ()
using Teuchos::rcp_implicit_cast;
using Teuchos::Array;
using Teuchos::ArrayView;
typedef Tpetra::CrsGraph<local_ordinal_type,
global_ordinal_type,
node_type> crs_graph_type;
const char prefix[] = "Ifpack2::MDF::initialize: ";

TEUCHOS_TEST_FOR_EXCEPTION
Expand Down
2 changes: 0 additions & 2 deletions packages/ifpack2/src/Ifpack2_ReorderFilter_def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,6 @@ permuteReorderedToOriginalTempl (const Tpetra::MultiVector<DomainScalar,local_or

#ifdef HAVE_IFPACK2_DEBUG
{
typedef Teuchos::ScalarTraits<DomainScalar> STS;
typedef Teuchos::ScalarTraits<magnitude_type> STM;
Teuchos::Array<magnitude_type> norms (reorderedX.getNumVectors ());
reorderedX.norm2 (norms ());
Expand Down Expand Up @@ -569,7 +568,6 @@ permuteReorderedToOriginalTempl (const Tpetra::MultiVector<DomainScalar,local_or

#ifdef HAVE_IFPACK2_DEBUG
{
typedef Teuchos::ScalarTraits<RangeScalar> STS;
typedef Teuchos::ScalarTraits<magnitude_type> STM;
Teuchos::Array<magnitude_type> norms (originalY.getNumVectors ());
originalY.norm2 (norms ());
Expand Down
12 changes: 6 additions & 6 deletions packages/ifpack2/test/belos/tpetra_native.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ template<class ViewType1,
>::mag_type,
typename ViewType2::non_const_value_type
>::value,
const int rank = ViewType1::Rank>
const int rank = ViewType1::rank>
class ElementWiseMultiply {};

template<class ViewType1,
Expand All @@ -65,7 +65,7 @@ class ElementWiseMultiply<ViewType1,
takeAbsoluteValueOfScalingFactors,
1> {
public:
static_assert (ViewType1::Rank == 1, "ViewType1 must be a rank-1 "
static_assert (ViewType1::rank == 1, "ViewType1 must be a rank-1 "
"Kokkos::View in order to use this specialization.");

ElementWiseMultiply (const ViewType1& X,
Expand Down Expand Up @@ -111,7 +111,7 @@ class ElementWiseMultiply<ViewType1,
takeAbsoluteValueOfScalingFactors,
2> {
public:
static_assert (ViewType1::Rank == 2, "ViewType1 must be a rank-2 "
static_assert (ViewType1::rank == 2, "ViewType1 must be a rank-2 "
"Kokkos::View in order to use this specialization.");

ElementWiseMultiply (const ViewType1& X,
Expand Down Expand Up @@ -251,7 +251,7 @@ template<class ViewType1,
>::mag_type,
typename ViewType2::non_const_value_type
>::value,
const int rank = ViewType1::Rank>
const int rank = ViewType1::rank>
class ElementWiseDivide {};

template<class ViewType1,
Expand All @@ -266,7 +266,7 @@ class ElementWiseDivide<ViewType1,
takeAbsoluteValueOfScalingFactors,
1> {
public:
static_assert (ViewType1::Rank == 1, "ViewType1 must be a rank-1 "
static_assert (ViewType1::rank == 1, "ViewType1 must be a rank-1 "
"Kokkos::View in order to use this specialization.");

ElementWiseDivide (const ViewType1& X,
Expand Down Expand Up @@ -312,7 +312,7 @@ class ElementWiseDivide<ViewType1,
takeAbsoluteValueOfScalingFactors,
2> {
public:
static_assert (ViewType1::Rank == 2, "ViewType1 must be a rank-2 "
static_assert (ViewType1::rank == 2, "ViewType1 must be a rank-2 "
"Kokkos::View in order to use this specialization.");

ElementWiseDivide (const ViewType1& X,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL(Ifpack2ILUT, ParILUT, Scalar, LocalOrdinal, Gl
using Teuchos::RCP;
typedef Node NT;

typedef Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node> tpetra_map_type;

typedef Tpetra::CrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,NT> crs_matrix_type;

typedef Xpetra::TpetraCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,NT> XCrsType;
Expand All @@ -99,6 +97,8 @@ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL(Ifpack2ILUT, ParILUT, Scalar, LocalOrdinal, Gl

//#define IFPACK2_DEBUG_PARILUT // This duplicates a Kokkos-Kernels unit test.
#ifdef IFPACK2_DEBUG_PARILUT
typedef Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node> tpetra_map_type;

GlobalOrdinal nx = 2, ny=2;
const Teuchos::RCP<const tpetra_map_type> rowmap = tif_utest::create_tpetra_map<LocalOrdinal,GlobalOrdinal,Node>(4);
RCP<crs_matrix_type> mtx = Teuchos::rcp(new crs_matrix_type(rowmap,4));
Expand Down
12 changes: 6 additions & 6 deletions packages/shylu/shylu_node/fastilu/src/shylu_fastic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,16 +242,16 @@ class FastICPrec
initTime = t;
}

void getL(OrdinalArray &lRowMap_, OrdinalArray &lColIdx_, ScalarArray &lVal_)
void getL(OrdinalArray &lRowMapArg, OrdinalArray &lColIdxArg, ScalarArray &lValArg)
{
lRowMap_ = lRowMap;
lColIdx_ = lColIdx;
lVal_ = lVal;
lRowMapArg = lRowMap;
lColIdxArg = lColIdx;
lValArg = lVal;
}

void getD(ScalarArray &diagElems_)
void getD(ScalarArray &diagElemsArg)
{
diagElems_ = diagElems;
diagElemsArg = diagElems;
}

void transposeL()
Expand Down
4 changes: 0 additions & 4 deletions packages/shylu/shylu_node/fastilu/src/shylu_fastildl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,6 @@ class FastILDLPrec
ScalarArray ltVal;
OrdinalArray ltColIdx;
OrdinalArray ltRowMap;
// mirrors
ScalarArrayMirror ltVal_;
OrdinalArrayMirror ltColIdx_;
OrdinalArrayMirror ltRowMap_;

//Pointer to the original host copy of A.
ScalarArrayMirror aValHost;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1369,7 +1369,6 @@ unpackAndCombineWithOwningPIDsCount (
using Kokkos::MemoryUnmanaged;
using Kokkos::View;
typedef typename Node::device_type DT;
typedef typename DT::execution_space execution_space;
const char prefix[] = "unpackAndCombineWithOwningPIDsCount: ";

TEUCHOS_TEST_FOR_EXCEPTION
Expand Down Expand Up @@ -1474,13 +1473,10 @@ unpackAndCombineIntoCrsArrays (
using Teuchos::REDUCE_MAX;
using Teuchos::reduceAll;

typedef LocalOrdinal LO;

typedef typename Node::device_type DT;

typedef CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> matrix_type;
typedef typename matrix_type::impl_scalar_type ST;
typedef typename ArrayView<const LO>::size_type size_type;

const char prefix[] = "Tpetra::Details::unpackAndCombineIntoCrsArrays_new: ";
# ifdef HAVE_TPETRA_MMM_TIMINGS
Expand Down

0 comments on commit b8638bd

Please sign in to comment.