Transfer a Sparse Matrix to a C Function

There are 2 optimizations I’m after:

  1. How to send the C function a pointer to colptr, rowval and nzval.
  2. How to make my whole Julia setup work with 32 Bit indices for the sparse matrix (See Convert a Current Installation of Julia to Use `BlasInt = `Int32`).

In (2) the problem I have is that most non trivial algorithms on Sparse Matrix (Decomposition) will gain from having indices in 32 Bit yet I don’t know about the other eco system (MKL Sparse, Suite Sparse, etc…). If I set my matrix to be 32 Bit, does it mean any call to a function of those libraries will create a conversion step?

I hope we have / we’ll have a way to configure all to be coherent. At the moment I don’t see a way to set MKL, MKL Sparse, Pardiso and other Intel based libraries to use LP64 mode (Some has but it will go away with Julia 1.7). I have no idea about SuiteSparse. It seems some of the algorithms support 32 Bit indices but it is not system wide.