diff --git a/.vs/CMakeWorkspaceSettings.json b/.vs/CMakeWorkspaceSettings.json new file mode 100644 index 00000000..2c63c085 --- /dev/null +++ b/.vs/CMakeWorkspaceSettings.json @@ -0,0 +1,2 @@ +{ +} diff --git a/.vs/ProjectSettings.json b/.vs/ProjectSettings.json new file mode 100644 index 00000000..8f0d7334 --- /dev/null +++ b/.vs/ProjectSettings.json @@ -0,0 +1,3 @@ +{ + "CurrentProjectSetting": "x64-Debug" +} \ No newline at end of file diff --git a/.vs/Samples_VS2022/config/applicationhost.config b/.vs/Samples_VS2022/config/applicationhost.config new file mode 100644 index 00000000..032d67c6 --- /dev/null +++ b/.vs/Samples_VS2022/config/applicationhost.config @@ -0,0 +1,959 @@ + + + + + + +
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.vs/Samples_VS2022/v17/.suo b/.vs/Samples_VS2022/v17/.suo new file mode 100644 index 00000000..58f941d6 Binary files /dev/null and b/.vs/Samples_VS2022/v17/.suo differ diff --git a/.vs/Samples_VS2022/v17/Browse.VC.db b/.vs/Samples_VS2022/v17/Browse.VC.db new file mode 100644 index 00000000..689003ba Binary files /dev/null and b/.vs/Samples_VS2022/v17/Browse.VC.db differ diff --git a/.vs/Samples_VS2022/v17/Browse.VC.db-shm b/.vs/Samples_VS2022/v17/Browse.VC.db-shm new file mode 100644 index 00000000..54c1bd38 Binary files /dev/null and b/.vs/Samples_VS2022/v17/Browse.VC.db-shm differ diff --git a/.vs/Samples_VS2022/v17/Browse.VC.db-wal b/.vs/Samples_VS2022/v17/Browse.VC.db-wal new file mode 100644 index 00000000..e69de29b diff --git a/.vs/Samples_VS2022/v17/Solution.VC.db b/.vs/Samples_VS2022/v17/Solution.VC.db new file mode 100644 index 00000000..86bbea7e Binary files /dev/null and b/.vs/Samples_VS2022/v17/Solution.VC.db differ diff --git a/.vs/Samples_VS2022/v17/Solution.VC.db-shm b/.vs/Samples_VS2022/v17/Solution.VC.db-shm new file mode 100644 index 00000000..407febea Binary files /dev/null and b/.vs/Samples_VS2022/v17/Solution.VC.db-shm differ diff --git a/.vs/Samples_VS2022/v17/Solution.VC.db-wal b/.vs/Samples_VS2022/v17/Solution.VC.db-wal new file mode 100644 index 00000000..694a6281 Binary files /dev/null and b/.vs/Samples_VS2022/v17/Solution.VC.db-wal differ diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json new file mode 100644 index 00000000..6b611411 --- /dev/null +++ b/.vs/VSWorkspaceState.json @@ -0,0 +1,6 @@ +{ + "ExpandedNodes": [ + "" + ], + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/.vs/cuda-samples/config/applicationhost.config b/.vs/cuda-samples/config/applicationhost.config new file mode 100644 index 00000000..032d67c6 --- /dev/null +++ b/.vs/cuda-samples/config/applicationhost.config @@ -0,0 +1,959 @@ + + + + + + +
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.vs/cuda-samples/v17/.suo b/.vs/cuda-samples/v17/.suo new file mode 100644 index 00000000..57dade92 Binary files /dev/null and b/.vs/cuda-samples/v17/.suo differ diff --git a/.vs/cuda-samples/v17/Browse.VC.db b/.vs/cuda-samples/v17/Browse.VC.db new file mode 100644 index 00000000..c844e066 Binary files /dev/null and b/.vs/cuda-samples/v17/Browse.VC.db differ diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite new file mode 100644 index 00000000..98ba36dd Binary files /dev/null and b/.vs/slnx.sqlite differ diff --git a/CppProperties.json b/CppProperties.json new file mode 100644 index 00000000..f598ba59 --- /dev/null +++ b/CppProperties.json @@ -0,0 +1,21 @@ +{ + "configurations": [ + { + "inheritEnvironments": [ + "msvc_x64" + ], + "name": "x64-Debug", + "includePath": [ + "${env.INCLUDE}", + "${workspaceRoot}\\**" + ], + "defines": [ + "WIN32", + "_DEBUG", + "UNICODE", + "_UNICODE" + ], + "intelliSenseMode": "windows-msvc-x64" + } + ] +} \ No newline at end of file diff --git a/Samples/0_Introduction/UnifiedMemoryStreams/Makefile b/Samples/0_Introduction/UnifiedMemoryStreams/Makefile index ba7b78b4..b8bcad3d 100644 --- a/Samples/0_Introduction/UnifiedMemoryStreams/Makefile +++ b/Samples/0_Introduction/UnifiedMemoryStreams/Makefile @@ -288,13 +288,24 @@ LIBRARIES := # Attempt to compile a minimal OpenMP application. If a.out exists, OpenMP is properly set up. ifneq (,$(filter $(TARGET_OS),linux android)) +# Special treatment for Clang to not use standard OMP Library and fix OMP 5 bug in Clang 13 +ifneq (,$(findstring "clang",$(HOST_COMPILER))) ifneq (,$(filter $(TARGET_OS), android)) LIBRARIES += -lomp else LIBRARIES += -lgomp endif - ALL_CCFLAGS += -Xcompiler -fopenmp +else + ALL_CCFLAGS += -Xcompiler -fopenmp + ALL_LDFLAGS += -Xcompiler -fopenmp + COMPILER_VERSION= $(shell $(HOST_COMPILER) --version) +ifneq (,$(findstring 13.,$(COMPILER_VERSION))) + ALL_CCFLAGS += -Xcompiler -fopenmp -Xcompiler -fopenmp-version=45 + ALL_LDFLAGS += -Xcompiler -fopenmp -Xcompiler -fopenmp-version=45 +endif +endif + $(shell echo "#include " > test.c ; echo "int main() { omp_get_num_threads(); return 0; }" >> test.c ; $(HOST_COMPILER) -fopenmp test.c) OPENMP ?= $(shell find a.out 2>/dev/null) diff --git a/Samples/0_Introduction/cudaOpenMP/Makefile b/Samples/0_Introduction/cudaOpenMP/Makefile index 476ddbc9..43403fe4 100644 --- a/Samples/0_Introduction/cudaOpenMP/Makefile +++ b/Samples/0_Introduction/cudaOpenMP/Makefile @@ -294,13 +294,25 @@ LIBRARIES := # Attempt to compile a minimal OpenMP application. If a.out exists, OpenMP is properly set up. ifneq (,$(filter $(TARGET_OS),linux android)) + +# Special treatment for Clang to not use standard OMP Library and fix OMP 5 bug in Clang 13 +ifneq (,$(findstring "clang",$(HOST_COMPILER))) ifneq (,$(filter $(TARGET_OS), android)) LIBRARIES += -lomp else LIBRARIES += -lgomp endif - ALL_CCFLAGS += -Xcompiler -fopenmp +else + ALL_CCFLAGS += -Xcompiler -fopenmp + ALL_LDFLAGS += -Xcompiler -fopenmp + COMPILER_VERSION= $(shell $(HOST_COMPILER) --version) +ifneq (,$(findstring 13.,$(COMPILER_VERSION))) + ALL_CCFLAGS += -Xcompiler -fopenmp -Xcompiler -fopenmp-version=45 + ALL_LDFLAGS += -Xcompiler -fopenmp -Xcompiler -fopenmp-version=45 +endif +endif + $(shell echo "#include " > test.c ; echo "int main() { omp_get_num_threads(); return 0; }" >> test.c ; $(HOST_COMPILER) -fopenmp test.c) OPENMP ?= $(shell find a.out 2>/dev/null) diff --git a/Samples/0_Introduction/simpleMPI/Makefile b/Samples/0_Introduction/simpleMPI/Makefile index 49fc56c3..006cc8e1 100644 --- a/Samples/0_Introduction/simpleMPI/Makefile +++ b/Samples/0_Introduction/simpleMPI/Makefile @@ -164,6 +164,10 @@ NVCCFLAGS := -m${TARGET_SIZE} CCFLAGS := LDFLAGS := +# Special treatment for Clang +ifneq (,$(findstring clang,$(HOST_COMPILER))) + CCFLAGS+= -fPIE +endif # build flags ifeq ($(TARGET_OS),darwin) LDFLAGS += -rpath $(CUDA_PATH)/lib diff --git a/Samples/3_CUDA_Features/simpleCudaGraphs/simpleCudaGraphs_vs2019.vcxproj b/Samples/3_CUDA_Features/simpleCudaGraphs/simpleCudaGraphs_vs2019.vcxproj index 7d3dfb84..963c7448 100644 --- a/Samples/3_CUDA_Features/simpleCudaGraphs/simpleCudaGraphs_vs2019.vcxproj +++ b/Samples/3_CUDA_Features/simpleCudaGraphs/simpleCudaGraphs_vs2019.vcxproj @@ -23,7 +23,7 @@ Application MultiByte - v142 + v143 10.0 @@ -99,10 +99,9 @@ - - + \ No newline at end of file diff --git a/Samples/4_CUDA_Libraries/boxFilterNPP/boxFilterNPP.cpp b/Samples/4_CUDA_Libraries/boxFilterNPP/boxFilterNPP.cpp index 3d177ce8..6f380248 100644 --- a/Samples/4_CUDA_Libraries/boxFilterNPP/boxFilterNPP.cpp +++ b/Samples/4_CUDA_Libraries/boxFilterNPP/boxFilterNPP.cpp @@ -167,9 +167,6 @@ int main(int argc, char *argv[]) { saveImage(sResultFilename, oHostDst); std::cout << "Saved image: " << sResultFilename << std::endl; - nppiFree(oDeviceSrc.data()); - nppiFree(oDeviceDst.data()); - exit(EXIT_SUCCESS); } catch (npp::Exception &rException) { std::cerr << "Program error! The following exception occurred: \n"; diff --git a/Samples/4_CUDA_Libraries/cannyEdgeDetectorNPP/cannyEdgeDetectorNPP.cpp b/Samples/4_CUDA_Libraries/cannyEdgeDetectorNPP/cannyEdgeDetectorNPP.cpp index e823e0b6..bf90625c 100644 --- a/Samples/4_CUDA_Libraries/cannyEdgeDetectorNPP/cannyEdgeDetectorNPP.cpp +++ b/Samples/4_CUDA_Libraries/cannyEdgeDetectorNPP/cannyEdgeDetectorNPP.cpp @@ -208,9 +208,6 @@ int main(int argc, char *argv[]) { saveImage(sResultFilename, oHostDst); std::cout << "Saved image: " << sResultFilename << std::endl; - nppiFree(oDeviceSrc.data()); - nppiFree(oDeviceDst.data()); - exit(EXIT_SUCCESS); } catch (npp::Exception &rException) { std::cerr << "Program error! The following exception occurred: \n"; diff --git a/Samples/simpleCudaGraphs/.vs/simpleCudaGraphs_vs2019/v17/.suo b/Samples/simpleCudaGraphs/.vs/simpleCudaGraphs_vs2019/v17/.suo new file mode 100644 index 00000000..74ce354e Binary files /dev/null and b/Samples/simpleCudaGraphs/.vs/simpleCudaGraphs_vs2019/v17/.suo differ diff --git a/Samples/simpleCudaGraphs/.vs/simpleCudaGraphs_vs2019/v17/Browse.VC.db b/Samples/simpleCudaGraphs/.vs/simpleCudaGraphs_vs2019/v17/Browse.VC.db new file mode 100644 index 00000000..4c8726be Binary files /dev/null and b/Samples/simpleCudaGraphs/.vs/simpleCudaGraphs_vs2019/v17/Browse.VC.db differ diff --git a/Samples/simpleCudaGraphs/simpleCudaGraphs_vs2019.vcxproj.user b/Samples/simpleCudaGraphs/simpleCudaGraphs_vs2019.vcxproj.user new file mode 100644 index 00000000..88a55094 --- /dev/null +++ b/Samples/simpleCudaGraphs/simpleCudaGraphs_vs2019.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Samples/simpleCudaGraphs/x64/Debug/simpleCudaGraphs_vs2019.log b/Samples/simpleCudaGraphs/x64/Debug/simpleCudaGraphs_vs2019.log new file mode 100644 index 00000000..ae986fe4 --- /dev/null +++ b/Samples/simpleCudaGraphs/x64/Debug/simpleCudaGraphs_vs2019.log @@ -0,0 +1 @@ +C:\Users\vrues\Documents\GitHub\cuda-samples\Samples\simpleCudaGraphs\simpleCudaGraphs_vs2019.vcxproj(37,5): error MSB4019: Das importierte Projekt "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA 11.1.props" wurde nicht gefunden. Stellen Sie sicher, dass der Ausdruck in der Import-Deklaration "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\\BuildCustomizations\CUDA 11.1.props" richtig ist und dass die Datei auf dem Datenträger vorhanden ist. diff --git a/Samples/simpleCudaGraphs/x64/Release/simpleCudaGraphs_vs2019.log b/Samples/simpleCudaGraphs/x64/Release/simpleCudaGraphs_vs2019.log new file mode 100644 index 00000000..ae986fe4 --- /dev/null +++ b/Samples/simpleCudaGraphs/x64/Release/simpleCudaGraphs_vs2019.log @@ -0,0 +1 @@ +C:\Users\vrues\Documents\GitHub\cuda-samples\Samples\simpleCudaGraphs\simpleCudaGraphs_vs2019.vcxproj(37,5): error MSB4019: Das importierte Projekt "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA 11.1.props" wurde nicht gefunden. Stellen Sie sicher, dass der Ausdruck in der Import-Deklaration "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\\BuildCustomizations\CUDA 11.1.props" richtig ist und dass die Datei auf dem Datenträger vorhanden ist. diff --git a/Samples/vulkanImageCUDA/.vs/vulkanImageCUDA_vs2019/v17/.suo b/Samples/vulkanImageCUDA/.vs/vulkanImageCUDA_vs2019/v17/.suo new file mode 100644 index 00000000..e9bc0d1f Binary files /dev/null and b/Samples/vulkanImageCUDA/.vs/vulkanImageCUDA_vs2019/v17/.suo differ diff --git a/Samples/vulkanImageCUDA/.vs/vulkanImageCUDA_vs2019/v17/Browse.VC.db b/Samples/vulkanImageCUDA/.vs/vulkanImageCUDA_vs2019/v17/Browse.VC.db new file mode 100644 index 00000000..72446310 Binary files /dev/null and b/Samples/vulkanImageCUDA/.vs/vulkanImageCUDA_vs2019/v17/Browse.VC.db differ diff --git a/Samples/vulkanImageCUDA/vulkanImageCUDA_vs2019.vcxproj.user b/Samples/vulkanImageCUDA/vulkanImageCUDA_vs2019.vcxproj.user new file mode 100644 index 00000000..88a55094 --- /dev/null +++ b/Samples/vulkanImageCUDA/vulkanImageCUDA_vs2019.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Samples/vulkanImageCUDA/x64/Debug/vulkanImageCUDA_vs2019.log b/Samples/vulkanImageCUDA/x64/Debug/vulkanImageCUDA_vs2019.log new file mode 100644 index 00000000..667317a0 --- /dev/null +++ b/Samples/vulkanImageCUDA/x64/Debug/vulkanImageCUDA_vs2019.log @@ -0,0 +1 @@ +C:\Users\vrues\Documents\GitHub\cuda-samples\Samples\vulkanImageCUDA\vulkanImageCUDA_vs2019.vcxproj(37,5): error MSB4019: Das importierte Projekt "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA 11.1.props" wurde nicht gefunden. Stellen Sie sicher, dass der Ausdruck in der Import-Deklaration "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\\BuildCustomizations\CUDA 11.1.props" richtig ist und dass die Datei auf dem Datenträger vorhanden ist.