Comparison to imate
primate
’s namesake (and some of the original code1) was inspired from the (excellent) imate
package, prompting questions about their differences. In general, primate
was developed with slightly different goals in mind than imate
, most of which have to do with things like integrability, extensibility, and choice of FFI / build system.
Notable differences between the two packages include:
Feature | primate |
imate |
---|---|---|
Matrix support | Symmetric only | Symmetric or Rectangular |
Parallel support | CPU only2 | CPU / GPU |
Function support | Arbitrary | Package supported3 |
Operator support | Arbitrary | Matrix-derived |
Linking strategy | Header only | Dynamically linked |
C++ version | \geq C++20 | Any |
FFI | Pybind11 | Cython |
Build tool | Meson | CMake |
One motivation for developing primate
was to modularize and streamline access to Lanczos-based methods, which is achieved through the use of things like function templates, type erasure, and header-only definitions. These modifications not only simplify access from user (i.e. dependent) packages, but they enable native support for arbitrary classes adhering to the LinearOperator concept. For more details on this, see the integration guides.
Footnotes
Before v0.2, much of
primate
’s code was essentially ported and refactored fromimate
. The code for v0.2+ has been re-written using the Eigen template C++ library.↩︎primate
does not provide native GPU-implemented Linear operators. However, there is nothing preventing one from using e.g. CUDA- or ROCm-based GPU-based tensor libraries to accelerate matrix-vector products. Indeed,primate
was designed to work with essentially any operator matching the interface.↩︎See imates documentation for the list of supported functions.↩︎