Feedback wanted: C++20 tensor library with NumPy-inspired API
I've been working on a tensor library and would appreciate feedback from people who actually know C++ well.
**What it is:** A tensor library targeting the NumPy/PyTorch mental model - shape broadcasting, views via strides, operator overloading, etc.
**Technical choices I made:**
* C++20 (concepts, ranges where appropriate)
* xsimd for portable SIMD across architectures
* Variant-based dtype system instead of templates everywhere
* Copy-on-write with shared\_ptr storage
**Things I'm uncertain about:**
* Is the Operation registry pattern overkill? It dispatches by OpType enum + Device
* Using std::variant for axis elements in einops parsing - should this be inheritance?
* The BLAS backend abstraction feels clunky
* Does Axiom actually seem useful?
* What features might make you use it over something like Eigen?
It started because I wanted NumPy's API but needed to deploy on edge devices without Python. Ended up going deeper than expected (28k LOC+) into BLAS backends, memory views, and GPU kernels.
Github: [https://github.com/frikallo/axiom](https://github.com/frikallo/axiom)
Would so appreciate feedback from anyone interested! Happy to answer questions about the implementation.
https://redd.it/1qu3acu
@r_cpp
Post #24748
19