Skip to content

Commit

Permalink
use jl_alloc_array_2d for all julia versions
Browse files Browse the repository at this point in the history
  • Loading branch information
benlorenz committed Dec 5, 2023
1 parent 80885a2 commit cf9d710
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions deps/src/caller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,7 @@ jl_value_t * intmat_to_jl_array(intvec * v)
{
int rows = v->rows();
int cols = v->cols();
#if (JULIA_VERSION_MAJOR * 100 + JULIA_VERSION_MINOR) >= 111
size_t dims[]{(size_t) rows, (size_t) cols};
jl_array_t * result = jl_alloc_array_nd(jl_int64_matrix_type, dims, 2);
#else
jl_array_t * result = jl_alloc_array_2d(jl_int64_matrix_type, rows, cols);
#endif
int64_t * result_ptr = jlcxx_array_data<int64_t>(result);
for (int i = 0; i < rows; i++)
{
Expand Down

0 comments on commit cf9d710

Please sign in to comment.