From 1696d9f263d15bb523f0f72b60dcec50d0f83374 Mon Sep 17 00:00:00 2001 From: vil02 <65706193+vil02@users.noreply.github.com> Date: Tue, 31 Mar 2026 22:05:35 +0200 Subject: [PATCH] Reduce code duplication by removing useless overrides These functions were identical to the ones in the base classes. --- src/LinAlg/hiopMatrixDenseRaja.hpp | 3 --- src/LinAlg/hiopMatrixDenseRowMajor.hpp | 3 --- src/LinAlg/hiopMatrixRajaSparseTriplet.hpp | 2 -- src/LinAlg/hiopVectorIntCompoundPD.cpp | 2 -- src/LinAlg/hiopVectorIntCompoundPD.hpp | 2 -- 5 files changed, 12 deletions(-) diff --git a/src/LinAlg/hiopMatrixDenseRaja.hpp b/src/LinAlg/hiopMatrixDenseRaja.hpp index dbc5f6c34..91fec0083 100644 --- a/src/LinAlg/hiopMatrixDenseRaja.hpp +++ b/src/LinAlg/hiopMatrixDenseRaja.hpp @@ -251,15 +251,12 @@ class hiopMatrixDenseRaja : public hiopMatrixDense #endif virtual size_type get_local_size_n() const { return n_local_; } virtual size_type get_local_size_m() const { return m_local_; } - virtual MPI_Comm get_mpi_comm() const { return comm_; } inline double* local_data_host() const { return data_host_; } double* local_data() { return data_dev_; } double* local_data_const() const { return data_dev_; } public: - virtual size_type m() const { return m_local_; } - virtual size_type n() const { return n_global_; } #ifdef HIOP_DEEPCHECKS virtual bool assertSymmetry(double tol = 1e-16) const; #endif diff --git a/src/LinAlg/hiopMatrixDenseRowMajor.hpp b/src/LinAlg/hiopMatrixDenseRowMajor.hpp index 90e6f62ba..87684818b 100644 --- a/src/LinAlg/hiopMatrixDenseRowMajor.hpp +++ b/src/LinAlg/hiopMatrixDenseRowMajor.hpp @@ -223,7 +223,6 @@ class hiopMatrixDenseRowMajor : public hiopMatrixDense #endif virtual size_type get_local_size_n() const { return n_local_; } virtual size_type get_local_size_m() const { return m_local_; } - virtual MPI_Comm get_mpi_comm() const { return comm_; } double* local_data_const() const { return M_[0]; } double* local_data() { return M_[0]; } @@ -233,8 +232,6 @@ class hiopMatrixDenseRowMajor : public hiopMatrixDense inline double** get_M() { return M_; } public: - virtual size_type m() const { return m_local_; } - virtual size_type n() const { return n_global_; } #ifdef HIOP_DEEPCHECKS virtual bool assertSymmetry(double tol = 1e-16) const; #endif diff --git a/src/LinAlg/hiopMatrixRajaSparseTriplet.hpp b/src/LinAlg/hiopMatrixRajaSparseTriplet.hpp index 25e6043ba..962f90b95 100644 --- a/src/LinAlg/hiopMatrixRajaSparseTriplet.hpp +++ b/src/LinAlg/hiopMatrixRajaSparseTriplet.hpp @@ -465,8 +465,6 @@ class hiopMatrixRajaSymSparseTriplet : public hiopMatrixRajaSparseTriplet