Skip to content

Commit

Permalink
Reduce warning amount with nvhpc
Browse files Browse the repository at this point in the history
  • Loading branch information
tcojean committed May 16, 2023
1 parent b37bf44 commit bd3b858
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion core/test/solver/gcr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ TYPED_TEST(Gcr, CanBeMoved)
using Solver = typename TestFixture::Solver;
auto copy = this->gcr_factory->generate(Mtx::create(this->exec));

copy->copy_from(std::move(this->solver));
copy->move_from(this->solver);

ASSERT_EQ(copy->get_size(), gko::dim<2>(3, 3));
auto copy_mtx = static_cast<Solver*>(copy.get())->get_system_matrix();
Expand Down
2 changes: 1 addition & 1 deletion include/ginkgo/core/base/polymorphic_object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class PolymorphicObject : public log::EnableLogging<PolymorphicObject> {
template <typename Derived, typename Deleter>
[[deprecated(
"This function will be removed in a future release, the replacement "
"will copy instead of move. If a move in intended, use move_to "
"will copy instead of move. If a move is intended, use move_from "
"instead.")]] std::
enable_if_t<
std::is_base_of<PolymorphicObject, std::decay_t<Derived>>::value,
Expand Down
14 changes: 10 additions & 4 deletions include/ginkgo/core/log/logger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,18 +518,24 @@ public: \
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
#endif // defined(__GNUC__) || defined(__clang__)
#ifdef __NVCOMPILER
#pragma diag_suppress 1445
#endif // __NVCOMPILER
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 5211, 4973, 4974)
#endif
#endif // _MSC_VER
this->on_iteration_complete(solver, it, r, x, tau, implicit_tau_sq);
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic pop
#endif
#endif // defined(__GNUC__) || defined(__clang__)
#ifdef __NVCOMPILER
#pragma diag_warning 1445
#endif // __NVCOMPILER
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif // _MSC_VER
}

public:
Expand Down
1 change: 0 additions & 1 deletion reference/test/solver/gcr_kernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ class Gcr : public ::testing::Test {
exec))
{
auto small_size = gko::dim<2>{3, 2};
constexpr gko::size_type small_restart{2};
small_b = gko::initialize<Mtx>(
{I<T>{1., 2.}, I<T>{3., 4.}, I<T>{5., 6.}}, exec);
small_x = Mtx::create(exec, small_size);
Expand Down

0 comments on commit bd3b858

Please sign in to comment.