Skip to content

Commit

Permalink
Fix errors caught by CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
pelesh committed Jul 2, 2024
1 parent f430b29 commit 31046e4
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 50 deletions.
4 changes: 2 additions & 2 deletions resolve/matrix/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ set(Matrix_SRC
Coo.cpp
MatrixHandler.cpp
MatrixHandlerCpu.cpp
utilities.cpp
Utilities.cpp
)

# C++ code that depends on CUDA SDK libraries
Expand All @@ -36,7 +36,7 @@ set(Matrix_HEADER_INSTALL
Csr.hpp
Csc.hpp
MatrixHandler.hpp
utilities.hpp
Utilities.hpp
)

# Build shared library ReSolve::matrix
Expand Down
3 changes: 1 addition & 2 deletions resolve/matrix/Csr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@

#include "Csr.hpp"
#include "Coo.hpp"
#include <resolve/utilities/misc/IndexValuePair.hpp>
#include <resolve/utilities/logger/Logger.hpp>
#include <resolve/matrix/utilities.hpp>
#include <resolve/matrix/Utilities.hpp>

namespace ReSolve
{
Expand Down
2 changes: 1 addition & 1 deletion resolve/matrix/MatrixHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <resolve/matrix/Csc.hpp>
#include <resolve/matrix/Csr.hpp>
#include <resolve/workspace/LinAlgWorkspace.hpp>
#include <resolve/matrix/utilities.hpp>
#include <resolve/matrix/Utilities.hpp>
#include "MatrixHandler.hpp"
#include "MatrixHandlerCpu.hpp"

Expand Down
39 changes: 37 additions & 2 deletions resolve/matrix/Utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,47 @@
#include <resolve/Common.hpp>
#include <resolve/matrix/Coo.hpp>
#include <resolve/matrix/Csr.hpp>
#include <resolve/utilities/misc/IndexValuePair.hpp>
#include <resolve/utilities/logger/Logger.hpp>
#include "utilities.hpp"
#include "Utilities.hpp"

namespace ReSolve
{
/// @brief Helper class for COO matrix sorting
class IndexValuePair
{
public:
IndexValuePair() : idx_(0), value_(0.0)
{}
~IndexValuePair()
{}
void setIdx (index_type new_idx)
{
idx_ = new_idx;
}
void setValue (real_type new_value)
{
value_ = new_value;
}

index_type getIdx()
{
return idx_;
}
real_type getValue()
{
return value_;
}

bool operator < (const IndexValuePair& str) const
{
return (idx_ < str.idx_);
}

private:
index_type idx_;
real_type value_;
};

using out = io::Logger;
namespace matrix
{
Expand Down
43 changes: 0 additions & 43 deletions resolve/utilities/misc/IndexValuePair.hpp

This file was deleted.

0 comments on commit 31046e4

Please sign in to comment.