Code Monkey home page Code Monkey logo

cs513_assignment_4's Introduction

MEMBERS

Michael Sherman
Subha Srikanth
Kshitij Vidyut Shah
Dhruv Dogra

Description
    The Makefile compiles both the computation code, as well as generation for a test dataset.

    gen_file creates a file named input.txt, and populates it with randomly generated doubles.
    These doubles are generated in the range form 0, to a selected input.
    In addition, the number of matrices is specified.

    In the file, constants are defined for the maximum size of each matrix, for the ILABs, 32 was chosen.


    multiply executes the multiplication, and assumes input.txt is named as such.
    It reads the number of matrices, their sizes, and values from the file.

    It takes two arguments as well, one is to switch between sequential and parallel multiplcation, and the
    other is to specify output file name.

Compilation:
    If needed, export the CUDA path with "export PATH=/usr/local/cuda/bin:${PATH}"

    Run make

Usage
    First, execute gen_file.

    ./gen_file 0.17 100000

    Then, execute multiply
    ./multiply tree out.txt

    Data structure

    Defined a matrix class, that stores x and y dimensions, as well as a device array of
    values. This is defined only for doubles.

    The class handles its own memory management, and supports indexing into the 
    matrix as normal.



Algorithms
    1.) Sequential multiplication on the CPU
    2.) Sequential multiplication on the GPU
    3.) Optimized sequential multiplication on the GPU
    4.) Binary tree parallel multiplication on the GPU
    5.) Hybrid approach between 3 and 4.

    (Note: Assume for GPU that individual matrix elements are bein multiplied in parallel,
    sequential and parallel above refer to how many matrices are in parallel.)

    The goal is to keep all cores busy, while running a work-efficient algorithm. 
    We do not have enough cores to run an inefficient algorithm, even if the time
    complexity is theoretically better for large numbers of cores.




References
    http://stackoverflow.com/questions/2076624/c-matrix-class

cs513_assignment_4's People

Contributors

msherman64 avatar subhasrikanth23 avatar

Watchers

James Cloos avatar  avatar

Forkers

xitizzz

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.