Skip to content
Open
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
5 changes: 5 additions & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ add_subdirectory(
${CMAKE_CURRENT_LIST_DIR}/simple-mallocMC
${CMAKE_BINARY_DIR}/examples/simple-mallocMC
)

add_subdirectory(
${CMAKE_CURRENT_LIST_DIR}/multi-setup-runtime
${CMAKE_BINARY_DIR}/examples/multi-setup-runtime
)
50 changes: 50 additions & 0 deletions examples/multi-setup-runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
cmake_minimum_required(VERSION 3.14...3.22)

if(POLICY CMP0167)
cmake_policy(SET CMP0167 NEW)
endif()
project(KitGenBenchExampleMultiSetupRuntime LANGUAGES CXX)

# --- Import tools ----

include(../../cmake/tools.cmake)

# ---- Dependencies ----

include(../../cmake/CPM.cmake)

cpmaddpackage(
NAME nlohmann_json
GITHUB_REPOSITORY nlohmann/json
VERSION 3.11.3 NO_TESTS
)

cpmaddpackage(
NAME alpaka
GITHUB_REPOSITORY alpaka-group/alpaka
GIT_TAG 1.2.0
)

cpmaddpackage(NAME KitGenBench SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/../..)

# ---- Create standalone executable ----

file(GLOB sources CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/source/*.cpp)

alpaka_add_executable(${PROJECT_NAME} ${sources})

set_target_properties(
${PROJECT_NAME}
PROPERTIES
CXX_STANDARD 20
OUTPUT_NAME ${PROJECT_NAME}
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF
)

target_link_libraries(
${PROJECT_NAME}
KitGenBench::KitGenBench
nlohmann_json::nlohmann_json
alpaka::alpaka
)
8 changes: 8 additions & 0 deletions examples/multi-setup-runtime/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Multi setup runtime

This examples shows how to use multiple, runtime-parametrised setups.
In this case, we're building on top of the `plain-malloc` example,
generalising to multiple different allocation sizes.

The interface to do so is not yet the most beautiful one
and likely (or hopefully) there will be change in the near future.
Loading
Loading