File tree 6 files changed +14
-11
lines changed
6 files changed +14
-11
lines changed Original file line number Diff line number Diff line change 7
7
.idea
8
8
cmake-build * /
9
9
out /
10
+ build /
Original file line number Diff line number Diff line change @@ -7,11 +7,9 @@ set(CMAKE_CUDA_ARCHITECTURES 61)
7
7
8
8
project (GPU_memory_access_visualization LANGUAGES CUDA)
9
9
10
+ # define header only target
11
+ add_library (CUDA_MAV_HEADER INTERFACE )
12
+ target_include_directories (CUDA_MAV_HEADER INTERFACE ${PROJECT_SOURCE_DIR} /include )
10
13
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)
3
2
4
3
set (_TARGET_NORMAL normal)
5
4
@@ -11,6 +10,8 @@ set_target_properties(${_TARGET_NORMAL} PROPERTIES
11
10
CUDA_CXX_STANDARD 17
12
11
)
13
12
13
+ # add include path to the cuda_mav.cuh header
14
+ target_link_libraries (${_TARGET_NORMAL} PRIVATE CUDA_MAV_HEADER)
14
15
15
16
set (_TARGET_ANNOTATED annotated)
16
17
Original file line number Diff line number Diff line change 1
1
#include < vector>
2
2
#include < numeric>
3
3
#include < iostream>
4
- #include " ../../src/ cuda_mav.cu "
4
+ #include " cuda_mav.cuh "
5
5
6
6
inline void checkCudaError (cudaError_t err) {
7
7
if (err != cudaSuccess) {
Original file line number Diff line number Diff line change
1
+ #pragma once
2
+
1
3
#include < stdexcept>
2
4
#include < cstdio>
3
5
#include < fstream>
4
6
#include < functional>
5
7
#include < sstream>
8
+ #include < vector>
9
+ #include < iostream>
6
10
7
11
// Define a custom template class which holds the data for the CUDA kernel
8
12
template <typename T>
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments