Reputation: 564
I am looking for a C++ fixed-size matrix library which would implement most common operations for vectors and matrices in the same way as boost::numeric::ublas does, but to be used within CUDA kernels (and thus be fixed-size to use only local memory and not global memory accesses).
I found several host-based matrix libraries: boost::numeric::ublas, Eigen, blitz, but they do not have fixed-size matrices I could use with CUDA on my kernels. Eigen has Matrix3f and corresponding stuff which is what I am looking for, but it does not survive compilation with nvcc (though there seems to be some progress in that direction, see here ).
Edit: I'm doing all that stuff on Linux, and thus would like to possibly have something cross-platform...
Upvotes: 4
Views: 943
Reputation: 161
What about XNA Math which is distributed with DirectX SDK? It contains special classes for vectors and matrices and tons of special functions for operations on them.
Upvotes: 0
Reputation:
If you're looking for a popular C++ math library that has been shown to work really well, you can try glm for your purposes. It's modeled after GLSL, which means its data is stored in column-major order, which is friendly with all shader/gpu-oriented designs. GLM is a header-only library and purported to be very standards-friendly, so maybe it'll compile properly for you.
Upvotes: 3