Skip to content

stonecoldhughes/sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Author: Harry Hughes
email: [email protected]
date: 7-21-2020

Introduction - what the project is:

  This sample project showcases a wide range of C++ language features as well as object oriented
  design, robust software design strategy, and clear coding style. Please read all comments for
  more detailed notes on source code. Source code found under "src/"
  presents a simple linear algebra library that carries out this specific linear algebra routine:

  ( M_0 kron M_1 kron ... kron M_n ) * v_in = v_out

  Where the "M_i" are matrices of matching dimensions
  "kron" indicates the Kronecker Product operation: 
                https://en.wikipedia.org/wiki/Kronecker_product
  "v_in" is a 1D vector,
  "v_out" is a 1D vector,
  "*" indicates matrix-vector multiplication

File Guide:

  data.hpp
  data.cpp
  data_tests.cpp

    These files showcase C++ templates used to create flexible objects.

  operation.hpp
  operation.cpp
  operation_tests.cpp

    These files showcase a complex problem solved using the library objects and routines
    defined in the "data" component.

  sample.cpp
  
    This file is empty

What the project is not:

  Performant
  Parallel

  Please see "Performance note" in operation.hpp for a more detailed explanation

The project contains:

  CMakeLists.txt - This defines the cross-platform build system file.

  src/ - source code

  contrib/ - contains 3rd party dependencies and any CMake input files needed to build them

  testing/ - special 3rd party library for unit tests

Instructions to build:

  Make a build directory under the top-level and run CMake: 

  :> mkdir build; cd build; cmake .. ;

  This creates a Makefile. Build the project with:

  :> make;

  Or if that's too slow, try:

  :> make -j;

Instructions to run:

  To run the tests and see what the library does, navigate to the build directory and run:

  :> ctest;

  This will run all the automated unit tests, display their names, and their respective results.
  Test files are compiled executables and can be run just like any other. Pass the "--help"
  option to any of the compiled unit test executables to get more detailed instructions about
  how to run specific unit tests.

About

Code Sample for ORNL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published