xtensor
Fastor
Our great sponsors
xtensor | Fastor | |
---|---|---|
8 | 5 | |
3,205 | 702 | |
1.7% | - | |
7.9 | 4.3 | |
9 days ago | 14 days ago | |
C++ | C++ | |
BSD 3-clause "New" or "Revised" License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
xtensor
- Does anyone know any good open source project to optimize?
- Container slicing in c++
-
Which is the best way to work with matrices and linear algebra using c++?
I use xtensor: https://github.com/xtensor-stack/xtensor
-
Can you give an example of well-designed C++ code, and explain why you think it is so?
Currently, one of my current favorites is xtensor.
-
Risk of valarray being deprecated?
xTensor natively supports tensors and multidimensional arrays - not just vectors and matrices. Is fast, but not always as fast as Eigen and Blaze - and compiles very slow. Has a nice syntax.
- Xtensor: multi-dimensional arrays with broadcasting and lazy computing
-
Eigen: A C++ template library for linear algebra
I wonder how Eigen compares to xtensor, which was inspired by Numpy and has support for views, slicing, and broadcasting?
https://github.com/xtensor-stack/xtensor
-
When researching and developing new algorithms to be used in the real-world production environment, what is your workflow and how do you usually do it? Do I have to prototype in Python, and then rewrite all code in C++/Rust?
You can try eigen (http://eigen.tuxfamily.org/), armadillo (http://arma.sourceforge.net/) which is based on LAPACK which is what numpy is based on and xtensor (https://github.com/QuantStack/xtensor) which I think is the closest thing to numpy you’re gonna find in c++
Fastor
-
Standard way of doing maths with arrays?
I'm going to throw in a recommendation for Fastor. It is generally faster than other libraries, is very lightweight, and has a pretty modern syntax.
- LibRapid -- High Performance Arrays for C++
-
From Julia to C++ Struggle
There are C++ libraries that deal with linear algebra and tensors that are able to produce fully vectorized code without requiring you to mess around with SIMD intrinsics. See, for instance, fastor, blaze, eigen and the huge Trillinos set of packages. C++ is very widely used when it comes to scientific HPC applications. All you need to do is google search or better yet, join r/cpp and r/cpp_questions and start asking away for the things you need. The C++ community is very welcoming and full of experts that will be able to help you.
-
Use of BLAS vs direct SIMD for linear algebra library operations?
Picking what size you are targeting is really important, though. Could the matrices you are working with realistically be bigger than say 32x32? BLAS is good for big matrices. It's not as great for small matrices. Eigen or Fastor will do better for these smaller problems. And for various common operations on sizes 2, 3, and 4, hand coded graphics-oriented libraries might outperform those.
-
Scientific computing in Cpp
Tensorflow, Machine learning: https://www.tensorflow.org/ Fastor, A tensor library: https://github.com/romeric/Fastor GNU Scientific Library(GSL): https://www.gnu.org/software/gsl/ Boost. FEniCS, A finite element library: https://fenicsproject.org/ Intel MKL, a BLAS+LAPACK+other goodies library: https://software.intel.com/content/www/us/en/develop/tools/math-kernel-library.html SuiteSparse, A sparse linear algebra library: http://faculty.cse.tamu.edu/davis/suitesparse.html Sundials, Nonlinear solvers: https://computing.llnl.gov/projects/sundials
What are some alternatives?
EA Standard Template Library - EASTL stands for Electronic Arts Standard Template Library. It is an extensive and robust implementation that has an emphasis on high performance.
DirectXMath - DirectXMath is an all inline SIMD C++ linear algebra library for use in games and graphics apps
dynarray - A header-only library, VLA for C++ (≥C++14). Extended version of std::experimental::dynarray
SwiftyWasmer - A Swift API for the Wasmer WebAssembly Runtime
ITensors.jl - A Julia library for efficient tensor computations and tensor network calculations
GLM - OpenGL Mathematics (GLM)
sundials - Official development repository for SUNDIALS - a SUite of Nonlinear and DIfferential/ALgebraic equation Solvers. Pull requests are welcome for bug fixes and minor changes.
pinocchio - A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
SPTK - A suite of speech signal processing tools
Pytorch - Tensors and Dynamic neural networks in Python with strong GPU acceleration
ArrayFire - ArrayFire: a general purpose GPU library.