Skip to content

Commit

Permalink
Fix JuliaToEigenMat
Browse files Browse the repository at this point in the history
  • Loading branch information
dannys4 committed Apr 26, 2023
1 parent f6c3ebd commit 455f4a8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bindings/julia/src/JlArrayConversions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ StridedMatrix<double, Kokkos::HostSpace> JuliaToKokkos(jlcxx::ArrayRef<double,2>
Eigen::Map<const Eigen::Matrix<int,Eigen::Dynamic, Eigen::Dynamic>,0,Eigen::OuterStride<>> JuliaToEigenMat(jlcxx::ArrayRef<int,2> mat) {
int* mptr = mat.data();
unsigned int rows = size(mat,0);
unsigned int cols = size(mat,1);
return Eigen::Map<const Eigen::Matrix<int,Eigen::Dynamic, Eigen::Dynamic>,0,Eigen::OuterStride<>>(mptr, rows, cols, Eigen::OuterStride<>(std::max(rows,cols)));
return Eigen::Map<const Eigen::Matrix<int,Eigen::Dynamic, Eigen::Dynamic>,0,Eigen::OuterStride<>>(mptr, rows, cols, Eigen::OuterStride<>(rows));
}

/**
Expand Down

0 comments on commit 455f4a8

Please sign in to comment.