Skip to content

lndpj/mlr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mlr

C++ SIMD OpenMP linear algebra math library

About

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

Dependencies

Building

cmake . --install-prefix=/usr
make install

Usage

#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]);
}

Links

Releases

No releases published

Packages

 
 
 

Contributors