C++ SIMD OpenMP linear algebra math library
mlr implements aligned array based vec<N,T> type for N-dimensional linear algebra math.
types
-
vec<N,T> -
pos<N,T> -
dir<N,T> -
col<N,T,C> -
f32<N> -
f64<N> -
f128<N> -
i8<N> -
u8<N> -
i16<N> -
u16<N> -
i32<N> -
u32<N> -
i64<N> -
u64<N> -
b8<N> -
b32<N> -
c8<N> -
c32<N> -
mat<C,R> -
bivec<N,T> -
mvec<N,T> -
quat<T> -
versor<T> -
motor<T> -
tensor<N,M,T>
operations
- dot
- norm
- norm_squared
- normalize
- normalized
- cross3
- perm
- det
- hat
- vee
- levi-civita
- hodge
- laplacian
cmake . --install-prefix=/usr
make install#include <mlr/vector.hpp>
int main(int argc, char** argv)
{
f32<3> a = {1,2,3};
f32<4> b = {4,5,6,7};
f32<3> c = 3.0f / (a + c) - 4.0f;
printf("[%f %f %f]\n",c[0],c[1],c[2]);
}