GithubHelp home page GithubHelp logo

easylinalg's Introduction

The linear algorithm is the foundation for computer science, beyond what we leant from the text book, I need to implement some simple linear algorithm from scratch servering for different goals.

This repo contains all aspects I know about the liner algorithm from programing's perspective.

StaticMem dir contains several example that create the vector and matrix by static allocation. This is only used for proof of the concepts. All these algorithm are implemented in c. Which is easily to be modified and adapted to other devices which may need particular function signature such as host and device. This only serve for specific case (since the assocaited algorithm only works for specific matrix and vector and the code can not be reused by other matrix). The contains here can be used as the example to test file for other more compilcated cases.

DynamicMem dir contains example that use the dynamic memory allocation, the gsl library is a complete and production ready library for this type

StaticMemTemplate shows how to use cpp template to handle the case to support the dynamic vector and matrix size. We just need to implement everything based on template. If the code is designed to run on CPU, we can use the std library, if we want to run same code on GPU or other customized devices, we do not use the std library.

OtherExampels shows some commonly used exmaple based on python scipy, gsl library and the EIGEN library. These libraries is originally designed to run on cpu and it is hard to be adopted to gpu. Since we need to update all function call and adding some key words such as device before the function call.

TODO

adding eigen decomposition for 3by3 4by4 and 8by8 split out into different header files. defination, symm matrix operation, unsymm ...

References

GSL online code https://github.com/ampl/gsl/tree/master

A good tutorial based on c code for linear algebra

https://www.andreinc.net/2021/01/20/writing-your-own-linear-algebra-matrix-library-in-c

This is also a good material:

https://www.omnicalculator.com/math/qr-decomposition

TODO

put all test in a separate file

easylinalg's People

Watchers

Jay 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.