A header only C++20 tensor library [WIP]
- Multi dimensional arrays
- Support static, dynamic and mixed shape tensors
- Lazy evaluation of expressions
- BLAS backend for high performance numerical linear algebra
- Chain expressions
- Factory functions: fill, ones, zeros, range, rand
- Compile to a shared library
- Tests for shared library
- Generate automatic python bindings
- Pythonizations
- CI/CD with tests
- Sparse tensors
- More special matrices
- Automatic differentiation
- Python documentation
- C++ API documentation
- Inplace operations
- Clang compiler with C++20 support
- CMake
- BLAS library (OpenBlas or BLIS)
- Multiply and add
#include <ten/tensor>
int main() {
auto a = ten::range<ten::matrix<float>>({3, 3});
auto b = ten::range<ten::matrix<float>>({3, 3});
auto c = ten::ones<ten::vector<float>>(3);
ten::vector<float> x = a * b + c;
}
- QR factorization
#include <ten/tensor>
#include <ten/linalg>
int main() {
auto a = ten::range<matrix<float>>({4, 4});
ten::qr qr_fact;
qr_fact.factorize(a);
auto [q, r] = qr_fact.factors();
std::cout << q << std::endl;
std::cout << r << std::endl;
}
mkdir build-examples
cd build-examples
cmake .. -DCMAKE_CXX_COMPILER=clang++ -DTENSEUR_EXAMPLES=ON
cmake --build . --
mkdir build-tests
cd build-tests
cmake .. -DCMAKE_CXX_COMPILER=clang++ -DTENSEUR_TESTS=ON
cmake --build . --
mkdir build-docs
cd build-docs
cmake .. -DCMAKE_CXX_COMPILER=clang++ -DTENSEUR_DOCS=ON
cmake --build . --