-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
80 lines (50 loc) · 2.16 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Author: Harry Hughes
email: harrynh3@gmail.com
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.