Coder Social home page Coder Social logo

vectorial's Introduction

    Vectorial - vector math library



  Motivation

    I couldn't find an open source math library that was usable and
    supported simd - especially the ARM NEON variant.


  Features

    Supports NEON, SSE, scalar and generic gcc vector extension.
    Most basic vector and matrix math is available, but not quite
    yet full featured.


  Design

    Vectorial consists of two main parts, pure-C wrapper around
    platform-specific vector instructions in the simd*.h files
    and C++ classes for common uses, the vec*.h and mat*.h

    The config.h autodetects approriate vector instructions to use.

    The platform-specific support is done with intrisincs only,
    allowing the compiler to have a full view of the code, hopefully
    resulting in better optimizations especially with reordering etc.


  Installation / Usage

    Add vectorial/include to your include path

    #include "vectorial/simd4f.h"  
    for C-only simd wrapper, using it looks like this:
      simd4f v = simd4f_normalize( simd4f_add( simd4f_create(1,2,3,4), y) );
      float z = simd4f_get_z(v);

    #include "vectorial/vectorial.h"
    for C++ classes. They reside in vectorial namespace, you might
    want to alias them to your own namespace
      namespace myproject {
        using namespace ::vectorial;
        // if you like different name: typedef vec3f Vector3;
      }
      using myproject::vec4f;
      
      vec4f v = normalize( vec4f(1,2,3,4) + y );
      float z = v.z();


  License

    2-clause BSD. See LICENSE




vectorial's People

Contributors

scoopr avatar dnschneid avatar jsanmiya avatar ardiyu07 avatar

Watchers

rosa maria palacios juncosa avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.