From f9dd4323af553e4b5c24508042da6e48cf9162b9 Mon Sep 17 00:00:00 2001 From: Jonathan Bentz Date: Wed, 18 Dec 2024 14:36:12 -0600 Subject: [PATCH 1/4] adding code to Linux-only samples to guard against building on Windows --- .../systemWideAtomics/CMakeLists.txt | 7 +- .../2_Concepts_and_Techniques/CMakeLists.txt | 67 ++++++++++--------- .../EGLStream_CUDA_CrossGPU/CMakeLists.txt | 37 +++++----- .../EGLStream_CUDA_Interop/CMakeLists.txt | 16 +++-- .../EGLSync_CUDAEvent_Interop/CMakeLists.txt | 56 +++++++++------- .../StreamPriorities/CMakeLists.txt | 18 +++-- .../simpleCUFFT_callback/CMakeLists.txt | 22 +++--- .../fluidsGLES/CMakeLists.txt | 4 ++ .../nbody_opengles/CMakeLists.txt | 16 +++-- .../simpleGLES/CMakeLists.txt | 16 +++-- .../simpleGLES_EGLOutput/CMakeLists.txt | 16 +++-- 11 files changed, 158 insertions(+), 117 deletions(-) diff --git a/Samples/0_Introduction/systemWideAtomics/CMakeLists.txt b/Samples/0_Introduction/systemWideAtomics/CMakeLists.txt index 934189ba..da4e588a 100644 --- a/Samples/0_Introduction/systemWideAtomics/CMakeLists.txt +++ b/Samples/0_Introduction/systemWideAtomics/CMakeLists.txt @@ -14,9 +14,9 @@ endif() # Include directories and libraries include_directories(../../../Common) +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") # Source file -# Add target for systemWideAtomics (Linux-only) -if(NOT WIN32) +# Add target for systemWideAtomics add_executable(systemWideAtomics systemWideAtomics.cu) target_compile_options(systemWideAtomics PRIVATE $<$:--extended-lambda>) @@ -24,4 +24,7 @@ if(NOT WIN32) target_compile_features(systemWideAtomics PRIVATE cxx_std_17 cuda_std_17) set_target_properties(systemWideAtomics PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +else() + message(STATUS "Will not build sample systemWideAtomics - requires Linux OS") endif() diff --git a/Samples/2_Concepts_and_Techniques/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/CMakeLists.txt index 69caf48d..4d147b83 100644 --- a/Samples/2_Concepts_and_Techniques/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/CMakeLists.txt @@ -1,33 +1,34 @@ -add_subdirectory(EGLStream_CUDA_CrossGPU) -add_subdirectory(EGLStream_CUDA_Interop) -#add_subdirectory(EGLSync_CUDAEvent_Interop) -add_subdirectory(FunctionPointers) -add_subdirectory(MC_EstimatePiInlineP) -add_subdirectory(MC_EstimatePiInlineQ) -add_subdirectory(MC_EstimatePiP) -add_subdirectory(MC_EstimatePiQ) -add_subdirectory(MC_SingleAsianOptionP) -add_subdirectory(boxFilter) -add_subdirectory(convolutionSeparable) -add_subdirectory(convolutionTexture) -add_subdirectory(dct8x8) -add_subdirectory(eigenvalues) -add_subdirectory(histogram) -add_subdirectory(imageDenoising) -add_subdirectory(inlinePTX) -add_subdirectory(inlinePTX_nvrtc) -add_subdirectory(interval) -add_subdirectory(particles) -add_subdirectory(radixSortThrust) -add_subdirectory(reduction) -add_subdirectory(reductionMultiBlockCG) -add_subdirectory(scalarProd) -add_subdirectory(scan) -add_subdirectory(segmentationTreeThrust) -add_subdirectory(shfl_scan) -add_subdirectory(sortingNetworks) -add_subdirectory(streamOrderedAllocation) -add_subdirectory(streamOrderedAllocationIPC) -add_subdirectory(streamOrderedAllocationP2P) -add_subdirectory(threadFenceReduction) -add_subdirectory(threadMigration) +cmake_minimum_required(VERSION 3.20) + +list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules") + +project(streamOrderedAllocationIPC LANGUAGES C CXX CUDA) + +find_package(CUDAToolkit REQUIRED) + +set(CMAKE_CUDA_ARCHITECTURES 50 52 60 61 70 75 80 86 89 90) +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + # set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -G") # enable cuda-gdb (expensive) +endif() + +# Include directories and libraries +include_directories(../../../Common) + +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") +# Source file +# Add target for streamOrderedAllocationIPC + add_executable(streamOrderedAllocationIPC streamOrderedAllocationIPC.cu ../../../Common/helper_multiprocess.cpp) + + target_compile_options(streamOrderedAllocationIPC PRIVATE $<$:--extended-lambda>) + + target_compile_features(streamOrderedAllocationIPC PRIVATE cxx_std_17 cuda_std_17) + + set_target_properties(streamOrderedAllocationIPC PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + + target_link_libraries(streamOrderedAllocationIPC PUBLIC + CUDA::cuda_driver +) +else() + message(STATUS "Will not build sample streamOrderedAllocationIPC - requires Linux OS") +endif() + diff --git a/Samples/2_Concepts_and_Techniques/EGLStream_CUDA_CrossGPU/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/EGLStream_CUDA_CrossGPU/CMakeLists.txt index 0079cfd4..3a36dbe0 100644 --- a/Samples/2_Concepts_and_Techniques/EGLStream_CUDA_CrossGPU/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/EGLStream_CUDA_CrossGPU/CMakeLists.txt @@ -16,27 +16,30 @@ include_directories(../../../Common) find_package(EGL) -# Source file -if(${EGL_FOUND}) - # Add target for EGLStream_CUDA_CrossGPU - add_executable(EGLStream_CUDA_CrossGPU cuda_consumer.cpp cuda_producer.cpp eglstrm_common.cpp kernel.cu main.cpp) +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + # Source file + if(${EGL_FOUND}) + # Add target for EGLStream_CUDA_CrossGPU + add_executable(EGLStream_CUDA_CrossGPU cuda_consumer.cpp cuda_producer.cpp eglstrm_common.cpp kernel.cu main.cpp) -target_compile_options(EGLStream_CUDA_CrossGPU PRIVATE $<$:--extended-lambda>) + target_compile_options(EGLStream_CUDA_CrossGPU PRIVATE $<$:--extended-lambda>) -target_compile_features(EGLStream_CUDA_CrossGPU PRIVATE cxx_std_17 cuda_std_17) + target_compile_features(EGLStream_CUDA_CrossGPU PRIVATE cxx_std_17 cuda_std_17) - set_target_properties(EGLStream_CUDA_CrossGPU PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + set_target_properties(EGLStream_CUDA_CrossGPU PROPERTIES CUDA_SEPARABLE_COMPILATION ON) - target_include_directories(EGLStream_CUDA_CrossGPU PUBLIC - ${EGL_INCLUDE_DIR} - ${CUDAToolkit_INCLUDE_DIRS} - ) - - target_link_libraries(EGLStream_CUDA_CrossGPU - ${EGL_LIBRARY} - CUDA::cuda_driver - ) + target_include_directories(EGLStream_CUDA_CrossGPU PUBLIC + ${EGL_INCLUDE_DIR} + ${CUDAToolkit_INCLUDE_DIRS} + ) + target_link_libraries(EGLStream_CUDA_CrossGPU + ${EGL_LIBRARY} + CUDA::cuda_driver + ) + else() + message(STATUS "EGL not found - will not build sample 'EGLStream_CUDA_CrossGPU'") + endif() else() - message(STATUS "EGL not found - will not build sample 'EGLStream_CUDA_CrossGPU'") + message(STATUS "Will not build sample EGLStream_CUDA_CrossGPU - requires Linux OS") endif() diff --git a/Samples/2_Concepts_and_Techniques/EGLStream_CUDA_Interop/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/EGLStream_CUDA_Interop/CMakeLists.txt index 62667b90..dc204a7c 100644 --- a/Samples/2_Concepts_and_Techniques/EGLStream_CUDA_Interop/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/EGLStream_CUDA_Interop/CMakeLists.txt @@ -16,14 +16,15 @@ include_directories(../../../Common) find_package(EGL) -# Source file -if(${EGL_FOUND}) +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + # Source file + if(${EGL_FOUND}) # Add target for EGLStream_CUDA_Interop add_executable(EGLStream_CUDA_Interop cuda_consumer.cpp cuda_producer.cpp eglstrm_common.cpp main.cpp) -target_compile_options(EGLStream_CUDA_Interop PRIVATE $<$:--extended-lambda>) + target_compile_options(EGLStream_CUDA_Interop PRIVATE $<$:--extended-lambda>) -target_compile_features(EGLStream_CUDA_Interop PRIVATE cxx_std_17 cuda_std_17) + target_compile_features(EGLStream_CUDA_Interop PRIVATE cxx_std_17 cuda_std_17) set_target_properties(EGLStream_CUDA_Interop PROPERTIES CUDA_SEPARABLE_COMPILATION ON) @@ -37,6 +38,9 @@ target_compile_features(EGLStream_CUDA_Interop PRIVATE cxx_std_17 cuda_std_17) CUDA::cuda_driver ) + else() + message(STATUS "EGL not found - will not build sample 'EGLStream_CUDA_Interop'") + endif() else() - message(STATUS "EGL not found - will not build sample 'EGLStream_CUDA_Interop'") -endif() + message(STATUS "Will not build sample EGLStream_CUDA_Interop - requires Linux OS") +endif() \ No newline at end of file diff --git a/Samples/2_Concepts_and_Techniques/EGLSync_CUDAEvent_Interop/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/EGLSync_CUDAEvent_Interop/CMakeLists.txt index e7fc1561..040d6cdc 100644 --- a/Samples/2_Concepts_and_Techniques/EGLSync_CUDAEvent_Interop/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/EGLSync_CUDAEvent_Interop/CMakeLists.txt @@ -18,39 +18,43 @@ find_package(EGL) find_package(X11) find_package(OpenGL) -# Source file -if(${OpenGL_FOUND}) - if(${EGL_FOUND}) - if(${X11_FOUND}) - # Add target for EGLSync_CUDAEvent_Interop - add_executable(EGLSync_CUDAEvent_Interop EGLSync_CUDAEvent_Interop.cu) +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + # Source file + if(${OpenGL_FOUND}) + if(${EGL_FOUND}) + if(${X11_FOUND}) + # Add target for EGLSync_CUDAEvent_Interop + add_executable(EGLSync_CUDAEvent_Interop EGLSync_CUDAEvent_Interop.cu) -target_compile_options(EGLSync_CUDAEvent_Interop PRIVATE $<$:--extended-lambda>) + target_compile_options(EGLSync_CUDAEvent_Interop PRIVATE $<$:--extended-lambda>) -target_compile_features(EGLSync_CUDAEvent_Interop PRIVATE cxx_std_17 cuda_std_17) + target_compile_features(EGLSync_CUDAEvent_Interop PRIVATE cxx_std_17 cuda_std_17) - set_target_properties(EGLSync_CUDAEvent_Interop PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + set_target_properties(EGLSync_CUDAEvent_Interop PROPERTIES CUDA_SEPARABLE_COMPILATION ON) - target_include_directories(EGLSync_CUDAEvent_Interop PUBLIC - ${CUDAToolkit_INCLUDE_DIRS} - ${EGL_INCLUDE_DIR} - ${X11_INCLUDE_DIR} - ${OPENGL_INCLUDE_DIR} - ) + target_include_directories(EGLSync_CUDAEvent_Interop PUBLIC + ${CUDAToolkit_INCLUDE_DIRS} + ${EGL_INCLUDE_DIR} + ${X11_INCLUDE_DIR} + ${OPENGL_INCLUDE_DIR} + ) - target_link_libraries(EGLSync_CUDAEvent_Interop - CUDA::cuda_driver - #CUDA::cudart - ${EGL_LIBRARY} - ${X11_LIBRARIES} - ${OPENGL_LIBRARIES} - ) + target_link_libraries(EGLSync_CUDAEvent_Interop + CUDA::cuda_driver + #CUDA::cudart + ${EGL_LIBRARY} + ${X11_LIBRARIES} + ${OPENGL_LIBRARIES} + ) + else() + message(STATUS "X11 libraries not found - will not build sample 'EGLSyncCUDAEvent_Interop'") + endif() else() - message(STATUS "X11 libraries not found - will not build sample 'EGLSyncCUDAEvent_Interop'") + message(STATUS "EGL not found - will not build sample 'EGLSync_CUDAEvent_Interop'") endif() else() - message(STATUS "EGL not found - will not build sample 'EGLSync_CUDAEvent_Interop'") + message(STATUS "OpenGL not found - will not build sample 'EGLSync_CUDAEvent_Interop'") endif() else() - message(STATUS "OpenGL not found - will not build sample 'EGLSync_CUDAEvent_Interop'") -endif() + message(STATUS "Will not build sample streamOrderedAllocationIPC - requires Linux OS") +endif() \ No newline at end of file diff --git a/Samples/3_CUDA_Features/StreamPriorities/CMakeLists.txt b/Samples/3_CUDA_Features/StreamPriorities/CMakeLists.txt index 010c5da4..70fb9de1 100644 --- a/Samples/3_CUDA_Features/StreamPriorities/CMakeLists.txt +++ b/Samples/3_CUDA_Features/StreamPriorities/CMakeLists.txt @@ -14,12 +14,18 @@ endif() # Include directories and libraries include_directories(../../../Common) -# Source file -# Add target for StreamPriorities -add_executable(StreamPriorities StreamPriorities.cu) +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + # Source file + # Add target for StreamPriorities + add_executable(StreamPriorities StreamPriorities.cu) -target_compile_options(StreamPriorities PRIVATE $<$:--extended-lambda>) + target_compile_options(StreamPriorities PRIVATE $<$:--extended-lambda>) + + target_compile_features(StreamPriorities PRIVATE cxx_std_17 cuda_std_17) + + set_target_properties(StreamPriorities PROPERTIES CUDA_SEPARABLE_COMPILATION ON) +else() + message(STATUS "Will not build sample StreamPriorities - requires Linux OS") +endif() -target_compile_features(StreamPriorities PRIVATE cxx_std_17 cuda_std_17) -set_target_properties(StreamPriorities PROPERTIES CUDA_SEPARABLE_COMPILATION ON) diff --git a/Samples/4_CUDA_Libraries/simpleCUFFT_callback/CMakeLists.txt b/Samples/4_CUDA_Libraries/simpleCUFFT_callback/CMakeLists.txt index ca00a084..d70ad84f 100644 --- a/Samples/4_CUDA_Libraries/simpleCUFFT_callback/CMakeLists.txt +++ b/Samples/4_CUDA_Libraries/simpleCUFFT_callback/CMakeLists.txt @@ -14,16 +14,20 @@ endif() # Include directories and libraries include_directories(../../../Common) -# Source file -# Add target for simpleCUFFT_callback -add_executable(simpleCUFFT_callback simpleCUFFT_callback.cu) +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + # Source file + # Add target for simpleCUFFT_callback + add_executable(simpleCUFFT_callback simpleCUFFT_callback.cu) -target_compile_options(simpleCUFFT_callback PRIVATE $<$:--extended-lambda>) + target_compile_options(simpleCUFFT_callback PRIVATE $<$:--extended-lambda>) -target_compile_features(simpleCUFFT_callback PRIVATE cxx_std_17 cuda_std_17) + target_compile_features(simpleCUFFT_callback PRIVATE cxx_std_17 cuda_std_17) -set_target_properties(simpleCUFFT_callback PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + set_target_properties(simpleCUFFT_callback PROPERTIES CUDA_SEPARABLE_COMPILATION ON) -target_link_libraries(simpleCUFFT_callback PRIVATE - CUDA::cufft -) + target_link_libraries(simpleCUFFT_callback PRIVATE + CUDA::cufft + ) +else() + message(STATUS "Will not build sample simpleCUFFT_callback - requires Linux OS") +endif() \ No newline at end of file diff --git a/Samples/5_Domain_Specific/fluidsGLES/CMakeLists.txt b/Samples/5_Domain_Specific/fluidsGLES/CMakeLists.txt index c8435829..25b5b7c8 100644 --- a/Samples/5_Domain_Specific/fluidsGLES/CMakeLists.txt +++ b/Samples/5_Domain_Specific/fluidsGLES/CMakeLists.txt @@ -14,6 +14,7 @@ endif() # Include directories and libraries include_directories(../../../Common) +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") # Source file # Add target for fluidsGLES add_executable(fluidsGLES fluidsGLES.cu) @@ -23,3 +24,6 @@ target_compile_options(fluidsGLES PRIVATE $<$:--extended- target_compile_features(fluidsGLES PRIVATE cxx_std_17 cuda_std_17) set_target_properties(fluidsGLES PROPERTIES CUDA_SEPARABLE_COMPILATION ON) +else() + message(STATUS "Will not build sample fluidsGLES - requires Linux OS") +endif() \ No newline at end of file diff --git a/Samples/5_Domain_Specific/nbody_opengles/CMakeLists.txt b/Samples/5_Domain_Specific/nbody_opengles/CMakeLists.txt index b1cd9cbe..ac02a090 100644 --- a/Samples/5_Domain_Specific/nbody_opengles/CMakeLists.txt +++ b/Samples/5_Domain_Specific/nbody_opengles/CMakeLists.txt @@ -14,12 +14,16 @@ endif() # Include directories and libraries include_directories(../../../Common) -# Source file -# Add target for nbody_opengles -add_executable(nbody_opengles nbody_opengles.cu) +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + # Source file + # Add target for nbody_opengles + add_executable(nbody_opengles nbody_opengles.cu) -target_compile_options(nbody_opengles PRIVATE $<$:--extended-lambda>) + target_compile_options(nbody_opengles PRIVATE $<$:--extended-lambda>) -target_compile_features(nbody_opengles PRIVATE cxx_std_17 cuda_std_17) + target_compile_features(nbody_opengles PRIVATE cxx_std_17 cuda_std_17) -set_target_properties(nbody_opengles PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + set_target_properties(nbody_opengles PROPERTIES CUDA_SEPARABLE_COMPILATION ON) +else() + message(STATUS "Will not build sample nbody_opengles - requires Linux OS") +endif() diff --git a/Samples/5_Domain_Specific/simpleGLES/CMakeLists.txt b/Samples/5_Domain_Specific/simpleGLES/CMakeLists.txt index 2bdbbe6c..24e0b3fa 100644 --- a/Samples/5_Domain_Specific/simpleGLES/CMakeLists.txt +++ b/Samples/5_Domain_Specific/simpleGLES/CMakeLists.txt @@ -14,12 +14,16 @@ endif() # Include directories and libraries include_directories(../../../Common) -# Source file -# Add target for simpleGLES -add_executable(simpleGLES simpleGLES.cu) +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + # Source file + # Add target for simpleGLES + add_executable(simpleGLES simpleGLES.cu) -target_compile_options(simpleGLES PRIVATE $<$:--extended-lambda>) + target_compile_options(simpleGLES PRIVATE $<$:--extended-lambda>) -target_compile_features(simpleGLES PRIVATE cxx_std_17 cuda_std_17) + target_compile_features(simpleGLES PRIVATE cxx_std_17 cuda_std_17) -set_target_properties(simpleGLES PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + set_target_properties(simpleGLES PROPERTIES CUDA_SEPARABLE_COMPILATION ON) +else() + message(STATUS "Will not build sample simpleGLES - requires Linux OS") +endif() \ No newline at end of file diff --git a/Samples/5_Domain_Specific/simpleGLES_EGLOutput/CMakeLists.txt b/Samples/5_Domain_Specific/simpleGLES_EGLOutput/CMakeLists.txt index d5a3f9fa..4ef4d376 100644 --- a/Samples/5_Domain_Specific/simpleGLES_EGLOutput/CMakeLists.txt +++ b/Samples/5_Domain_Specific/simpleGLES_EGLOutput/CMakeLists.txt @@ -14,12 +14,16 @@ endif() # Include directories and libraries include_directories(../../../Common) -# Source file -# Add target for simpleGLES_EGLOutput -add_executable(simpleGLES_EGLOutput simpleGLES_EGLOutput.cu) +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + # Source file + # Add target for simpleGLES_EGLOutput + add_executable(simpleGLES_EGLOutput simpleGLES_EGLOutput.cu) -target_compile_options(simpleGLES_EGLOutput PRIVATE $<$:--extended-lambda>) + target_compile_options(simpleGLES_EGLOutput PRIVATE $<$:--extended-lambda>) -target_compile_features(simpleGLES_EGLOutput PRIVATE cxx_std_17 cuda_std_17) + target_compile_features(simpleGLES_EGLOutput PRIVATE cxx_std_17 cuda_std_17) -set_target_properties(simpleGLES_EGLOutput PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + set_target_properties(simpleGLES_EGLOutput PROPERTIES CUDA_SEPARABLE_COMPILATION ON) +else() + message(STATUS "Will not build sample simpleGLES_EGLOutput - requires Linux OS") +endif() \ No newline at end of file From 1292881b37161e95497bd92f9d5894b4ed7375b3 Mon Sep 17 00:00:00 2001 From: Jonathan Bentz Date: Thu, 19 Dec 2024 10:53:11 -0600 Subject: [PATCH 2/4] reverting to previous commit --- .../2_Concepts_and_Techniques/CMakeLists.txt | 67 +++++++++---------- 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/Samples/2_Concepts_and_Techniques/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/CMakeLists.txt index 4d147b83..69caf48d 100644 --- a/Samples/2_Concepts_and_Techniques/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/CMakeLists.txt @@ -1,34 +1,33 @@ -cmake_minimum_required(VERSION 3.20) - -list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules") - -project(streamOrderedAllocationIPC LANGUAGES C CXX CUDA) - -find_package(CUDAToolkit REQUIRED) - -set(CMAKE_CUDA_ARCHITECTURES 50 52 60 61 70 75 80 86 89 90) -if(CMAKE_BUILD_TYPE STREQUAL "Debug") - # set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -G") # enable cuda-gdb (expensive) -endif() - -# Include directories and libraries -include_directories(../../../Common) - -if(CMAKE_SYSTEM_NAME STREQUAL "Linux") -# Source file -# Add target for streamOrderedAllocationIPC - add_executable(streamOrderedAllocationIPC streamOrderedAllocationIPC.cu ../../../Common/helper_multiprocess.cpp) - - target_compile_options(streamOrderedAllocationIPC PRIVATE $<$:--extended-lambda>) - - target_compile_features(streamOrderedAllocationIPC PRIVATE cxx_std_17 cuda_std_17) - - set_target_properties(streamOrderedAllocationIPC PROPERTIES CUDA_SEPARABLE_COMPILATION ON) - - target_link_libraries(streamOrderedAllocationIPC PUBLIC - CUDA::cuda_driver -) -else() - message(STATUS "Will not build sample streamOrderedAllocationIPC - requires Linux OS") -endif() - +add_subdirectory(EGLStream_CUDA_CrossGPU) +add_subdirectory(EGLStream_CUDA_Interop) +#add_subdirectory(EGLSync_CUDAEvent_Interop) +add_subdirectory(FunctionPointers) +add_subdirectory(MC_EstimatePiInlineP) +add_subdirectory(MC_EstimatePiInlineQ) +add_subdirectory(MC_EstimatePiP) +add_subdirectory(MC_EstimatePiQ) +add_subdirectory(MC_SingleAsianOptionP) +add_subdirectory(boxFilter) +add_subdirectory(convolutionSeparable) +add_subdirectory(convolutionTexture) +add_subdirectory(dct8x8) +add_subdirectory(eigenvalues) +add_subdirectory(histogram) +add_subdirectory(imageDenoising) +add_subdirectory(inlinePTX) +add_subdirectory(inlinePTX_nvrtc) +add_subdirectory(interval) +add_subdirectory(particles) +add_subdirectory(radixSortThrust) +add_subdirectory(reduction) +add_subdirectory(reductionMultiBlockCG) +add_subdirectory(scalarProd) +add_subdirectory(scan) +add_subdirectory(segmentationTreeThrust) +add_subdirectory(shfl_scan) +add_subdirectory(sortingNetworks) +add_subdirectory(streamOrderedAllocation) +add_subdirectory(streamOrderedAllocationIPC) +add_subdirectory(streamOrderedAllocationP2P) +add_subdirectory(threadFenceReduction) +add_subdirectory(threadMigration) From 8d06d246b3c79103d89865e9b81b093bffa9d442 Mon Sep 17 00:00:00 2001 From: Jonathan Bentz Date: Thu, 19 Dec 2024 13:15:39 -0600 Subject: [PATCH 3/4] Updating for more linux guarding --- .../streamOrderedAllocationIPC/CMakeLists.txt | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Samples/2_Concepts_and_Techniques/streamOrderedAllocationIPC/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/streamOrderedAllocationIPC/CMakeLists.txt index e39aba3d..4d147b83 100644 --- a/Samples/2_Concepts_and_Techniques/streamOrderedAllocationIPC/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/streamOrderedAllocationIPC/CMakeLists.txt @@ -14,16 +14,21 @@ endif() # Include directories and libraries include_directories(../../../Common) +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") # Source file # Add target for streamOrderedAllocationIPC -add_executable(streamOrderedAllocationIPC streamOrderedAllocationIPC.cu ../../../Common/helper_multiprocess.cpp) + add_executable(streamOrderedAllocationIPC streamOrderedAllocationIPC.cu ../../../Common/helper_multiprocess.cpp) -target_compile_options(streamOrderedAllocationIPC PRIVATE $<$:--extended-lambda>) + target_compile_options(streamOrderedAllocationIPC PRIVATE $<$:--extended-lambda>) -target_compile_features(streamOrderedAllocationIPC PRIVATE cxx_std_17 cuda_std_17) + target_compile_features(streamOrderedAllocationIPC PRIVATE cxx_std_17 cuda_std_17) -set_target_properties(streamOrderedAllocationIPC PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + set_target_properties(streamOrderedAllocationIPC PROPERTIES CUDA_SEPARABLE_COMPILATION ON) -target_link_libraries(streamOrderedAllocationIPC PUBLIC - CUDA::cuda_driver + target_link_libraries(streamOrderedAllocationIPC PUBLIC + CUDA::cuda_driver ) +else() + message(STATUS "Will not build sample streamOrderedAllocationIPC - requires Linux OS") +endif() + From 9c4287fc51f5e9b6b7f413c24bfd096ad13c8fc4 Mon Sep 17 00:00:00 2001 From: Jonathan Bentz Date: Thu, 19 Dec 2024 13:20:48 -0600 Subject: [PATCH 4/4] one more fix on guarding Linux --- .../EGLSync_CUDAEvent_Interop/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Samples/2_Concepts_and_Techniques/EGLSync_CUDAEvent_Interop/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/EGLSync_CUDAEvent_Interop/CMakeLists.txt index 040d6cdc..45fcb294 100644 --- a/Samples/2_Concepts_and_Techniques/EGLSync_CUDAEvent_Interop/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/EGLSync_CUDAEvent_Interop/CMakeLists.txt @@ -56,5 +56,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") message(STATUS "OpenGL not found - will not build sample 'EGLSync_CUDAEvent_Interop'") endif() else() - message(STATUS "Will not build sample streamOrderedAllocationIPC - requires Linux OS") -endif() \ No newline at end of file + message(STATUS "Will not build sample EGLSync_CUDAEvent_Interop + - requires Linux OS") +endif()