diff --git a/src/main.cc b/src/main.cc index 2fce186..bbbc60e 100644 --- a/src/main.cc +++ b/src/main.cc @@ -4,9 +4,7 @@ #include #include -#include "serial/include/Activators.hpp" -#include "serial/include/ErrorFunction.hpp" -#include "serial/include/Network.hpp" +#include "nnhep.hpp" int main(int argc, char** argv) { double eta{0.975}; diff --git a/src/nnhep.hpp b/src/nnhep.hpp new file mode 100644 index 0000000..eb8982b --- /dev/null +++ b/src/nnhep.hpp @@ -0,0 +1,12 @@ + +#ifndef nnhep_hpp +#define nnhep_hpp + +#include "nnhep/DataFormats/Matrix.hpp" +#include "nnhep/DataFormats/VectorOperations.hpp" +#include "nnhep/headers/Activators.hpp" +#include "nnhep/headers/ErrorFunction.hpp" +#include "nnhep/headers/Layer.hpp" +#include "nnhep/headers/Network.hpp" + +#endif diff --git a/src/serial/DataFormats/Matrix.hpp b/src/nnhep/DataFormats/Matrix.hpp similarity index 100% rename from src/serial/DataFormats/Matrix.hpp rename to src/nnhep/DataFormats/Matrix.hpp diff --git a/src/serial/DataFormats/VectorOperations.hpp b/src/nnhep/DataFormats/VectorOperations.hpp similarity index 100% rename from src/serial/DataFormats/VectorOperations.hpp rename to src/nnhep/DataFormats/VectorOperations.hpp diff --git a/src/serial/include/Activators.hpp b/src/nnhep/headers/Activators.hpp similarity index 100% rename from src/serial/include/Activators.hpp rename to src/nnhep/headers/Activators.hpp diff --git a/src/serial/include/ErrorFunction.hpp b/src/nnhep/headers/ErrorFunction.hpp similarity index 98% rename from src/serial/include/ErrorFunction.hpp rename to src/nnhep/headers/ErrorFunction.hpp index 31e4556..4331c00 100644 --- a/src/serial/include/ErrorFunction.hpp +++ b/src/nnhep/headers/ErrorFunction.hpp @@ -14,7 +14,7 @@ #include #include -#include "DataFormats/Matrix.hpp" +#include "../DataFormats/Matrix.hpp" #include "Layer.hpp" template diff --git a/src/serial/include/Layer.hpp b/src/nnhep/headers/Layer.hpp similarity index 99% rename from src/serial/include/Layer.hpp rename to src/nnhep/headers/Layer.hpp index 981b67d..387fdee 100644 --- a/src/serial/include/Layer.hpp +++ b/src/nnhep/headers/Layer.hpp @@ -15,7 +15,7 @@ #include #include -#include "DataFormats/Matrix.hpp" +#include "../DataFormats/Matrix.hpp" /// @brief Layer of a neural network /// @tparam T The type of the node values diff --git a/src/serial/include/Network.hpp b/src/nnhep/headers/Network.hpp similarity index 99% rename from src/serial/include/Network.hpp rename to src/nnhep/headers/Network.hpp index d8c4ba7..c6382d7 100644 --- a/src/serial/include/Network.hpp +++ b/src/nnhep/headers/Network.hpp @@ -17,8 +17,8 @@ #include "Activators.hpp" #include "Layer.hpp" -#include "DataFormats/Matrix.hpp" -#include "DataFormats/VectorOperations.hpp" +#include "../DataFormats/Matrix.hpp" +#include "../DataFormats/VectorOperations.hpp" template using shared = std::shared_ptr; @@ -176,7 +176,7 @@ template typename Act> typename Loss> -Network::Network(const std::vector& nodes_per_layer) +Network::Network(const std::vector& nodes_per_layer) : n_layers{static_cast(nodes_per_layer.size())}, m_layers(n_layers + 1), m_weights(n_layers + 1), diff --git a/src/test.cc b/src/test.cc index 2d14cc8..ceb15ff 100644 --- a/src/test.cc +++ b/src/test.cc @@ -4,9 +4,7 @@ #include #include -#include "serial/include/Activators.hpp" -#include "serial/include/ErrorFunction.hpp" -#include "serial/include/Network.hpp" +#include "nnhep.hpp" int main() { double eta{0.975}; diff --git a/src/training_and_validation.cc b/src/training_and_validation.cc index d2d4405..63c16c6 100644 --- a/src/training_and_validation.cc +++ b/src/training_and_validation.cc @@ -4,9 +4,7 @@ #include #include -#include "serial/include/Activators.hpp" -#include "serial/include/ErrorFunction.hpp" -#include "serial/include/Network.hpp" +#include "nnhep.hpp" void train_and_validate(double eta, int hidden_layer_size) { Network net({30, hidden_layer_size, 1}); diff --git a/test/serial/ActivatorsTest/Activators.cc b/test/serial/ActivatorsTest/Activators.cc index 181afda..e3b2845 100644 --- a/test/serial/ActivatorsTest/Activators.cc +++ b/test/serial/ActivatorsTest/Activators.cc @@ -2,7 +2,7 @@ #include #include -#include "../../src/serial/include/Activators.hpp" +#include "nnhep.hpp" #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN #include "doctest.h" diff --git a/test/serial/ActivatorsTest/CMakeLists.txt b/test/serial/ActivatorsTest/CMakeLists.txt index 4e35424..db862ff 100644 --- a/test/serial/ActivatorsTest/CMakeLists.txt +++ b/test/serial/ActivatorsTest/CMakeLists.txt @@ -23,7 +23,7 @@ if(NOT doctest_POPULATED) endif() # Set base directory for serial code -include_directories(../../../src/serial/) +include_directories(../../../src/) # Compile add_executable(Activators.out ./Activators.cc) diff --git a/test/serial/MatrixTest/CMakeLists.txt b/test/serial/MatrixTest/CMakeLists.txt index 1cdff79..8f382c5 100644 --- a/test/serial/MatrixTest/CMakeLists.txt +++ b/test/serial/MatrixTest/CMakeLists.txt @@ -23,7 +23,7 @@ if(NOT doctest_POPULATED) endif() # Set base directory for serial code -include_directories(../../../src/serial/) +include_directories(../../../src/) # Compile add_executable(MatrixSum.out ./MatrixSum.cc) diff --git a/test/serial/MatrixTest/MatrixMultiplication.cc b/test/serial/MatrixTest/MatrixMultiplication.cc index d8975cb..0c6ae04 100644 --- a/test/serial/MatrixTest/MatrixMultiplication.cc +++ b/test/serial/MatrixTest/MatrixMultiplication.cc @@ -4,7 +4,7 @@ #include #include -#include "DataFormats/Matrix.hpp" +#include "nnhep/DataFormats/Matrix.hpp" #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN #include "doctest.h" diff --git a/test/serial/MatrixTest/MatrixSum.cc b/test/serial/MatrixTest/MatrixSum.cc index 07ac859..106907e 100644 --- a/test/serial/MatrixTest/MatrixSum.cc +++ b/test/serial/MatrixTest/MatrixSum.cc @@ -4,7 +4,7 @@ #include #include -#include "DataFormats/Matrix.hpp" +#include "nnhep/DataFormats/Matrix.hpp" #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN #include "doctest.h" diff --git a/test/serial/MatrixTest/MatrixTransposition.cc b/test/serial/MatrixTest/MatrixTransposition.cc index 5f6dc25..9a92993 100644 --- a/test/serial/MatrixTest/MatrixTransposition.cc +++ b/test/serial/MatrixTest/MatrixTransposition.cc @@ -4,7 +4,7 @@ #include #include -#include "DataFormats/Matrix.hpp" +#include "nnhep/DataFormats/Matrix.hpp" #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN #include "doctest.h"