File tree Expand file tree Collapse file tree 6 files changed +14
-11
lines changed
Expand file tree Collapse file tree 6 files changed +14
-11
lines changed Original file line number Diff line number Diff line change 77.idea
88cmake-build * /
99out /
10+ build /
Original file line number Diff line number Diff line change @@ -7,11 +7,9 @@ set(CMAKE_CUDA_ARCHITECTURES 61)
77
88project (GPU_memory_access_visualization LANGUAGES CUDA)
99
10+ # define header only target
11+ add_library (CUDA_MAV_HEADER INTERFACE )
12+ target_include_directories (CUDA_MAV_HEADER INTERFACE ${PROJECT_SOURCE_DIR} /include )
1013
11-
12- include_directories (.)
13- include_directories (src)
14-
15-
16- add_executable (GPU_memory_access_visualization
17- src/cuda_mav.cu src/cuda_mav.h)
14+ # the visualization function is no standalone application, therefore we test it with some examples
15+ add_subdirectory (examples/basic)
Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.18)
2- project (ranges LANGUAGES CUDA)
1+ cmake_minimum_required (VERSION 3.24)
32
43set (_TARGET_NORMAL normal)
54
@@ -11,6 +10,8 @@ set_target_properties(${_TARGET_NORMAL} PROPERTIES
1110 CUDA_CXX_STANDARD 17
1211)
1312
13+ # add include path to the cuda_mav.cuh header
14+ target_link_libraries (${_TARGET_NORMAL} PRIVATE CUDA_MAV_HEADER)
1415
1516set (_TARGET_ANNOTATED annotated)
1617
Original file line number Diff line number Diff line change 11#include < vector>
22#include < numeric>
33#include < iostream>
4- #include " ../../src/ cuda_mav.cu "
4+ #include " cuda_mav.cuh "
55
66inline void checkCudaError (cudaError_t err) {
77 if (err != cudaSuccess) {
Original file line number Diff line number Diff line change 1+ #pragma once
2+
13#include < stdexcept>
24#include < cstdio>
35#include < fstream>
46#include < functional>
57#include < sstream>
8+ #include < vector>
9+ #include < iostream>
610
711// Define a custom template class which holds the data for the CUDA kernel
812template <typename T>
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments