Skip to content

Conversation

@Li-Xiang-Ideal
Copy link
Contributor

CHANGES

  • add SparseMatMul, SparseTensorContract, SparseTensorDot and SparseMatInv for SparseRREF.wl
  • rename the shared library from mathlink/mma_link.cpp to sprreflink/sprreflink.cpp
  • unify API naming rules (e.g. rational_rref to sprref_rat_rref)

Add `WolframLibrary_getVersion()` and `WolframLibrary_initialize()`.
Add `sprref_` prefix to avoid potential name conflicts.

Files
- mma_link.cpp -> sprreflink.cpp
- mathlink.* -> sprreflink.*
Functions
- `mod_rref` -> `sprref_mod_rref`
- `rational_rref` -> `sprref_rat_rref`
- `modpmatmul` -> `sprref_mod_matmul`
- `ratmat_inv` -> `sprref_rat_matinv`
Support "OutputMode" -> 2 (RREF,Pivots) and 3 (RREF,Kernel,Pivots)
Add `SparseTensorContract` and `SparseTensorDot`
And fix a small bug in `sparse_mat_inverse`
@Li-Xiang-Ideal
Copy link
Contributor Author

To be more specific, the changes include:

Rename some files and functions

  • Add WolframLibrary_getVersion() and WolframLibrary_initialize().
  • Add sprref_ prefix to API name to avoid potential conflicts.
  • Rename files
    mma_link.cpp -> sprreflink.cpp
    mathlink.* -> sprreflink.*
  • Rename functions
    mod_rref -> sprref_mod_rref
    rational_rref -> sprref_rat_rref
    modpmatmul -> sprref_mod_matmul
    ratmat_inv -> sprref_rat_matinv

Support more OutputMode for modRREF

  • Support "OutputMode" -> 2 (RREF,Pivots) and 3 (RREF,Kernel,Pivots)

Add SparseMatMul

  • Add SparseMatMul[] using API sprref_mod_matmul and sprref_rat_matmul

Add SparseTensorContract

  • Add SparseTensorContract[] and SparseTensorDot[], using API sprref_mod_tensor_contract and sprref_rat_tensor_contract

Add SparseMatInv

  • Add SparseMatInv[] using API sprref_mod_matinv and sprref_rat_matinv
  • Fix a small bug in sparse_mat_inverse

Use size_t in loop counters to handle large `nnz`
Other small adjustments to make compiler happy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant