File tree Expand file tree Collapse file tree 19 files changed +132
-106
lines changed
Expand file tree Collapse file tree 19 files changed +132
-106
lines changed Original file line number Diff line number Diff line change @@ -29,8 +29,6 @@ find_package(spdlog REQUIRED)
2929find_package (simdjson REQUIRED)
3030
3131file (GLOB SOURCES "src/dsf/base/*.cpp" "src/dsf/mobility/*.cpp" "src/dsf/utility/*.cpp" "src/dsf/geometry/*.cpp" )
32- # Exclude binding.cpp from the main library - it's only for Python bindings
33- list (FILTER SOURCES EXCLUDE REGEX ".*binding\\ .cpp$" )
3432
3533include (FetchContent)
3634# Get rapidcsv
@@ -86,7 +84,7 @@ if(BUILD_PYTHON_BINDINGS)
8684 endif ()
8785
8886 # Add the Python binding module
89- add_library (dsf_python_module MODULE src/dsf/mobility/binding .cpp)
87+ add_library (dsf_python_module MODULE src/dsf/binding_mobility .cpp)
9088
9189 # Ensure the Python module name has no 'lib' prefix on Unix systems
9290 set_target_properties (dsf_python_module PROPERTIES
Original file line number Diff line number Diff line change @@ -943,7 +943,7 @@ WARN_LOGFILE =
943943# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
944944# Note: If this tag is empty the current directory is searched.
945945
946- INPUT = ./src/dsf/headers \
946+ INPUT = ./src/dsf \
947947 ./src/dsf/python
948948
949949# This tag can be used to specify the character encoding of the source files
Original file line number Diff line number Diff line change 11#include < cstdint>
22
3- #include " RoadNetwork.hpp"
4- #include " Itinerary.hpp"
5- #include " FirstOrderDynamics.hpp"
3+ #include " mobility/ RoadNetwork.hpp"
4+ #include " mobility/ Itinerary.hpp"
5+ #include " mobility/ FirstOrderDynamics.hpp"
66#include " Bench.hpp"
77
88#include < spdlog/spdlog.h>
99
10- using RoadNetwork = dsf::RoadNetwork;
11- using Itinerary = dsf::Itinerary;
12- using Dynamics = dsf::FirstOrderDynamics;
10+ using RoadNetwork = dsf::mobility:: RoadNetwork;
11+ using Itinerary = dsf::mobility:: Itinerary;
12+ using Dynamics = dsf::mobility:: FirstOrderDynamics;
1313
1414using Bench = sb::Bench<long long int >;
1515
Original file line number Diff line number Diff line change @@ -26,10 +26,11 @@ if(NOT rapidcsv_POPULATED)
2626 FetchContent_MakeAvailable(rapidcsv)
2727endif ()
2828
29- include_directories (../../src/dsf/headers )
29+ include_directories (../../src/dsf)
3030include_directories (../../src/dsf/utility/)
3131
32- file (GLOB SOURCES "../../src/dsf/base/*.cpp src/dsf/mobility/*.cpp" "../../src/dsf/utility/*.cpp" "../../src/dsf/geometry/*.cpp" )
32+ file (GLOB SOURCES "../../src/dsf/base/*.cpp" "../../src/dsf/mobility/*.cpp" "../../src/dsf/utility/*.cpp" "../../src/dsf/geometry/*.cpp" )
33+ list (FILTER SOURCES EXCLUDE REGEX ".*binding.*\\ .cpp$" )
3334
3435# Compile
3536add_executable (bench_dynamics.out BenchDynamics.cpp ${SOURCES} )
Original file line number Diff line number Diff line change 55#include < utility>
66#include " Bench.hpp"
77
8- #include " RoadNetwork.hpp"
8+ #include " mobility/ RoadNetwork.hpp"
99
10- using RoadNetwork = dsf::RoadNetwork;
11- using Intersection = dsf::Intersection;
12- using Street = dsf::Street;
10+ using RoadNetwork = dsf::mobility:: RoadNetwork;
11+ using Intersection = dsf::mobility:: Intersection;
12+ using Street = dsf::mobility:: Street;
1313using SparseMatrix = dsf::SparseMatrix<bool >;
1414
1515using Bench = sb::Bench<long long int >;
Original file line number Diff line number Diff line change @@ -13,10 +13,11 @@ string(APPEND CMAKE_CXX_FLAGS "-Wall -Wextra -O3")
1313# Set the folder for the executable
1414set (EXECUTABLE_OUTPUT_PATH ../../)
1515
16- include_directories (../../src/)
16+ include_directories (../../src/dsf )
1717include_directories (../../src/dsf/utility/)
1818
19- file (GLOB SOURCES "../../src/dsf/base/*.cpp src/dsf/mobility/*.cpp" "../../src/dsf/utility/*.cpp" "../../src/dsf/geometry/*.cpp" )
19+ file (GLOB SOURCES "../../src/dsf/base/*.cpp" "../../src/dsf/mobility/*.cpp" "../../src/dsf/utility/*.cpp" "../../src/dsf/geometry/*.cpp" )
20+ list (FILTER SOURCES EXCLUDE REGEX ".*binding.*\\ .cpp$" )
2021
2122# Compile
2223add_executable (bench_graph.out BenchGraph.cpp ${SOURCES} )
Original file line number Diff line number Diff line change 44#include < random>
55#include " Bench.hpp"
66
7- #include " RoadNetwork.hpp"
7+ #include " mobility/ RoadNetwork.hpp"
88
9- using Agent = dsf::Agent;
10- using Street = dsf::Street;
9+ using Agent = dsf::mobility:: Agent;
10+ using Street = dsf::mobility:: Street;
1111using SparseMatrix = dsf::SparseMatrix<bool >;
1212
1313using Bench = sb::Bench<long long int >;
Original file line number Diff line number Diff line change @@ -13,10 +13,11 @@ string(APPEND CMAKE_CXX_FLAGS "-Wall -Wextra -O3")
1313# Set the folder for the executable
1414set (EXECUTABLE_OUTPUT_PATH ../../)
1515
16- include_directories (../../src/dsf/headers )
16+ include_directories (../../src/dsf)
1717include_directories (../../src/dsf/utility/)
1818
19- file (GLOB SOURCES "../../src/dsf/base/*.cpp src/dsf/mobility/*.cpp" "../../src/dsf/utility/*.cpp" "../../src/dsf/geometry/*.cpp" )
19+ file (GLOB SOURCES "../../src/dsf/base/*.cpp" "../../src/dsf/mobility/*.cpp" "../../src/dsf/utility/*.cpp" "../../src/dsf/geometry/*.cpp" )
20+ list (FILTER SOURCES EXCLUDE REGEX ".*binding.*\\ .cpp$" )
2021
2122# Compile
2223add_executable (bench_street.out BenchStreet.cpp ${SOURCES} )
Original file line number Diff line number Diff line change @@ -31,11 +31,11 @@ std::atomic<bool> bExitFlag{false};
3131#define PRINT_OUT_SPIRES
3232// #define PRINT_SPEEDS
3333
34- using RoadNetwork = dsf::RoadNetwork;
35- using Dynamics = dsf::FirstOrderDynamics;
36- using Street = dsf::Street;
37- using SpireStreet = dsf::SpireStreet;
38- using Roundabout = dsf::Roundabout;
34+ using RoadNetwork = dsf::mobility:: RoadNetwork;
35+ using Dynamics = dsf::mobility:: FirstOrderDynamics;
36+ using Street = dsf::mobility:: Street;
37+ using SpireStreet = dsf::mobility:: SpireStreet;
38+ using Roundabout = dsf::mobility:: Roundabout;
3939
4040void printLoadingBar (int const i, int const n) {
4141 std::cout << " Loading: " << std::setprecision (2 ) << std::fixed << (i * 100 . / n) << " %"
Original file line number Diff line number Diff line change @@ -32,11 +32,11 @@ std::atomic<bool> bExitFlag{false};
3232// #define PRINT_SPEEDS
3333// #define PRINT_TP
3434
35- using RoadNetwork = dsf::RoadNetwork;
36- using Dynamics = dsf::FirstOrderDynamics;
37- using Street = dsf::Street;
38- using SpireStreet = dsf::SpireStreet;
39- using TrafficLight = dsf::TrafficLight;
35+ using RoadNetwork = dsf::mobility:: RoadNetwork;
36+ using Dynamics = dsf::mobility:: FirstOrderDynamics;
37+ using Street = dsf::mobility:: Street;
38+ using SpireStreet = dsf::mobility:: SpireStreet;
39+ using TrafficLight = dsf::mobility:: TrafficLight;
4040
4141void printLoadingBar (int const i, int const n) {
4242 std::cout << " Loading: " << std::setprecision (2 ) << std::fixed << (i * 100 . / n) << " %"
You can’t perform that action at this time.
0 commit comments