Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ UseTab: Never
AllowShortFunctionsOnASingleLine: Empty
IndentPPDirectives: AfterHash
SortIncludes: true
IncludeCategories:
- Regex: '^<gtest/.*'
Priority: 1
- Regex: '^<.*'
Priority: 2
- Regex: '.*'
Priority: 3
FixNamespaceComments: true
InsertBraces: true
QualifierAlignment: Left
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
tar -xzvf ubuntu-gcc-install-ubuntu-24.04.tar.gz -C install
- name: Run perf tests
run: |
bash -e scripts/generate_perf_results.sh
scripts/run_tests.py --running-type=performance
env:
PPC_NUM_PROC: 2
PPC_NUM_THREADS: 2
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
tar -xzvf macos-clang-install.tar.gz -C install
- name: Run perf tests
run: |
bash -e scripts/generate_perf_results.sh
scripts/run_tests.py --running-type=performance
env:
PPC_NUM_PROC: 1
PPC_NUM_THREADS: 2
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
[submodule "3rdparty/libenvpp"]
path = 3rdparty/libenvpp
url = https://github.com/ph3at/libenvpp
[submodule "3rdparty/benchmark"]
path = 3rdparty/benchmark
url = https://github.com/google/benchmark
1 change: 1 addition & 0 deletions 3rdparty/benchmark
Submodule benchmark added at a84606
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ endforeach()

message( STATUS "PPC step: Setup external projects" )
include(cmake/gtest.cmake)
include(cmake/benchmark.cmake)

############################## Modules ##############################

Expand Down
1 change: 0 additions & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ PROJECT_BRIEF = "Parallel Programming Course"
INPUT = modules/task/include \
modules/util/include \
modules/util/src \
modules/performance/include \
modules/runners/include \
modules/runners/src
FILE_PATTERNS = *.h *.c *.hpp *.cpp
Expand Down
51 changes: 51 additions & 0 deletions cmake/benchmark.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
include_guard()

include(ExternalProject)

ExternalProject_Add(
ppc_benchmark
SOURCE_DIR "${CMAKE_SOURCE_DIR}/3rdparty/benchmark"
PREFIX "${CMAKE_CURRENT_BINARY_DIR}/ppc_benchmark"
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/ppc_benchmark/build"
INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/ppc_benchmark/install"
EXCLUDE_FROM_ALL TRUE
CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER}
-DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}
-DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}
-DCMAKE_CXX_STANDARD_REQUIRED=${CMAKE_CXX_STANDARD_REQUIRED}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
${PPC_EXTERNAL_PROJECT_CMAKE_ARGS}
-DCMAKE_C_FLAGS=-w
-DCMAKE_CXX_FLAGS=-w
-DBENCHMARK_ENABLE_TESTING=OFF
-DBENCHMARK_ENABLE_GTEST_TESTS=OFF
-DBENCHMARK_ENABLE_WERROR=OFF
-DBENCHMARK_ENABLE_INSTALL=ON
-DBENCHMARK_ENABLE_LIBPFM=OFF
BUILD_COMMAND
"${CMAKE_COMMAND}" --build "${CMAKE_CURRENT_BINARY_DIR}/ppc_benchmark/build"
--config $<CONFIG> --parallel
INSTALL_COMMAND
"${CMAKE_COMMAND}" --install
"${CMAKE_CURRENT_BINARY_DIR}/ppc_benchmark/build" --config $<CONFIG>
--prefix "${CMAKE_CURRENT_BINARY_DIR}/ppc_benchmark/install"
${PPC_EXTERNAL_PROJECT_LOG_ARGS})

function(ppc_include_benchmark target_name)
target_include_directories(
${target_name} PUBLIC ${CMAKE_SOURCE_DIR}/3rdparty/benchmark/include)
target_compile_definitions(${target_name} PUBLIC BENCHMARK_STATIC_DEFINE)
endfunction()

function(ppc_link_benchmark target_name)
ppc_include_benchmark(${target_name})
add_dependencies(${target_name} ppc_benchmark)
target_link_directories(${target_name} PUBLIC
"${CMAKE_BINARY_DIR}/ppc_benchmark/install/lib")
target_link_libraries(${target_name} PUBLIC benchmark Threads::Threads)
if(WIN32)
target_link_libraries(${target_name} PUBLIC shlwapi)
endif()
endfunction()
6 changes: 0 additions & 6 deletions docs/user_guide/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,3 @@ Utility Module

.. doxygennamespace:: ppc::util
:project: ParallelProgrammingCourse

Performance Module
------------------

.. doxygennamespace:: ppc::performance
:project: ParallelProgrammingCourse
1 change: 1 addition & 0 deletions modules/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ set_target_properties(${exec_func_lib} PROPERTIES LINKER_LANGUAGE CXX)
target_include_directories(
${exec_func_lib} PUBLIC ${CMAKE_SOURCE_DIR}/3rdparty
${CMAKE_SOURCE_DIR}/modules ${CMAKE_SOURCE_DIR}/tasks)
ppc_include_benchmark(${exec_func_lib})

foreach(
link
Expand Down
133 changes: 0 additions & 133 deletions modules/performance/include/performance.hpp

This file was deleted.

Loading
Loading