Skip to content

Commit

Permalink
Use Eigen instead of Meschach
Browse files Browse the repository at this point in the history
  • Loading branch information
alkino committed Aug 29, 2023
1 parent 58539ec commit dcbea61
Show file tree
Hide file tree
Showing 8 changed files with 247 additions and 419 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@
[submodule "external/CLI11"]
path = external/CLI11
url = https://github.com/CLIUtils/CLI11.git
[submodule "external/eigen"]
path = external/eigen
url = https://gitlab.com/libeigen/eigen
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ if(NOT EXISTS "${CODING_CONV_CMAKE}/3rdparty.cmake")
endif()
include("${CODING_CONV_CMAKE}/3rdparty.cmake")
cpp_cc_git_submodule(Random123)
option(EIGEN_BUILD_TESTING "" OFF)
cpp_cc_git_submodule(eigen BUILD PACKAGE Eigen3::Eigen REQUIRED)

# =================================================================================================
# Enable sanitizer support if the NRN_SANITIZERS variable is set. Comes befores PythonHelper.cmake.
Expand Down
1 change: 1 addition & 0 deletions external/eigen
Submodule eigen added at 328b5f
11 changes: 0 additions & 11 deletions src/ivoc/matrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,6 @@ extern int hoc_return_type_code;
extern double hoc_scan(FILE*);
extern Object** hoc_temp_objptr(Object*);

#if 0
extern void install_matrix_method(const char* name, double (*)(...));
extern void* matrix_arg(int);
extern double* matrix_pelm(void*, int i, int j);
extern int matrix_nrow(void*);
extern int matrix_ncol(void*);
extern int matrix_type(void*); // FULL 1, SPARSE 2, BAND 3
extern MAT* matrix_full(void*); // hoc_execerror if void* not right type
extern SPMAT* matrix_sparse(void*);
#endif

static void check_domain(int i, int j) {
if (i > j || i < 0) {
auto const tmp = "index=" + std::to_string(i) + " max_index=" + std::to_string(j) + "\n";
Expand Down
Loading

0 comments on commit dcbea61

Please sign in to comment.