Giter Club home page Giter Club logo

tendto / linear-system-solver Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 401 KB

A linear system of equations solver that uses Gaussian elimination implemented on OpenCL aimed to take advantage of the GPU to improve the performance on large systems

Home Page: http://tendto.github.io/Linear-System-Solver/

License: MIT License

Makefile 4.48% C 95.52%
linear-algebra matrix-calculations gpu-computing opencl c linear-system-solver gauss-elimination

linear-system-solver's Introduction

System Solver

Small application that aims to solve systems of linear equations using the general compute capabilities of the GPUs

Table of contents


๐Ÿ”ง Setting up a local istance

Requirements

Steps

  • Make sure the path to the CL header is correct, or edit it accordingly.

  • make main
  • The executable will be found in the bin folder, while all the object files will be in the build folder

  • You can also run the compiler manually. All the c files are in the src folder, while the headers are in the include folder.

Use:

---------------------------------------------------------------------
Usage: ./bin/LinearSystemSolver [-i infname] [-o outfname] [-s seed] [-d dim] [-v] ocldname impcode
---------------------------------------------------------------------
impcode      -  implementation you want to use.
                1: no pivot cpu
                2: no pivot lmem [deprecated]
                3: no pivot texture
                4: no pivot buffer
                5: partial pivot cpu
                6: partial pivot texture
                7: partial pivot buffer
ocldname     -  path to the directory that contains the oclfiles

-i infname   -  path of the file from which to fetch the matrix.
                It must state all the elements of the complete matrix, separated by spaces, row by row
-o outfname  -  path of the file where to print the result vector.
                Defaults to use the standard output. If it is not specified, a dummy matrix will be generated
-s seed      -  seed used to generate the matrix if -f is not specified.
                Defaults to 123
-d dim       -  number of unknowns of the matrix.
                Defaults to 1000
-v           -  enables vectorization, if the chosen implementation supports it.
                The number of unknowns must be 1 less than a multiple of 4

๐Ÿ“Š [Optional] Testing

Requirements

Steps

  • Make sure the path to the check header is correct, or edit it accordingly.

  • make test
  • The test runner will be found in the bin folder, while all the object files will be in the build folder

๐Ÿ“š Documentation

Table of contents
Code documentation

Credits

  • Giuseppe Bilotta for the ocl_boiler.h (and for teaching me all the OpenCL fundamentals and more)
  • c-project-template for the structure of the project and of the Makefile

linear-system-solver's People

Contributors

tendto avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.