diff --git a/CMakeLists.txt b/CMakeLists.txt index 996cb1c3..5cf10216 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,17 +21,14 @@ if(CUDA_FOUND) # to make sure more people can easily run class code without knowing # about this compiler argument set(CUDA_NVCC_FLAGS " - -ccbin /usr/bin/clang; -gencode;arch=compute_30,code=sm_30; -gencode;arch=compute_35,code=sm_35; -gencode;arch=compute_35,code=compute_35; - -gencode;arch=compute_20,code=sm_20; - -gencode;arch=compute_11,code=sm_11; - -gencode;arch=compute_12,code=sm_12; - -gencode;arch=compute_13,code=sm_13;") + -gencode;arch=compute_20,code=sm_20;") # add -Wextra compiler flag for gcc compilations if (UNIX) + set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-ccbin /usr/bin/clang") set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler -Wextra") set(CMAKE_CXX_FLAGS "-stdlib=libstdc++") endif (UNIX) @@ -39,12 +36,12 @@ if(CUDA_FOUND) # add debugging to CUDA NVCC flags. For NVidia's NSight tools. set(CUDA_NVCC_FLAGS_DEBUG ${CUDA_NVCC_FLAGS_DEBUG} "-G") - add_subdirectory (HW1) - add_subdirectory (HW2) - add_subdirectory (HW3) - add_subdirectory (HW4) - add_subdirectory (HW5) - add_subdirectory (HW6) + add_subdirectory ("Problem Sets/Problem Set 1") + add_subdirectory ("Problem Sets/Problem Set 2") + add_subdirectory ("Problem Sets/Problem Set 3") + add_subdirectory ("Problem Sets/Problem Set 4") + add_subdirectory ("Problem Sets/Problem Set 5") + add_subdirectory ("Problem Sets/Problem Set 6") else(CUDA_FOUND) message("CUDA is not installed on this system.") endif() diff --git a/Problem Sets/Problem Set 1/utils.h b/Problem Sets/Problem Set 1/utils.h index 35f954cb..7485a3da 100755 --- a/Problem Sets/Problem Set 1/utils.h +++ b/Problem Sets/Problem Set 1/utils.h @@ -8,6 +8,7 @@ #include #include #include +#include #define checkCudaErrors(val) check( (val), #val, __FILE__, __LINE__) diff --git a/Problem Sets/Problem Set 3/utils.h b/Problem Sets/Problem Set 3/utils.h index 35f954cb..7485a3da 100755 --- a/Problem Sets/Problem Set 3/utils.h +++ b/Problem Sets/Problem Set 3/utils.h @@ -8,6 +8,7 @@ #include #include #include +#include #define checkCudaErrors(val) check( (val), #val, __FILE__, __LINE__) diff --git a/Problem Sets/Problem Set 4/utils.h b/Problem Sets/Problem Set 4/utils.h index 35f954cb..7485a3da 100755 --- a/Problem Sets/Problem Set 4/utils.h +++ b/Problem Sets/Problem Set 4/utils.h @@ -8,6 +8,7 @@ #include #include #include +#include #define checkCudaErrors(val) check( (val), #val, __FILE__, __LINE__) diff --git a/Problem Sets/Problem Set 5/main.cu b/Problem Sets/Problem Set 5/main.cu index 15071cd4..18451f36 100755 --- a/Problem Sets/Problem Set 5/main.cu +++ b/Problem Sets/Problem Set 5/main.cu @@ -5,6 +5,7 @@ #include "utils.h" #include "timer.h" #include +#include #if defined(_WIN16) || defined(_WIN32) || defined(_WIN64) #include #else @@ -51,7 +52,7 @@ int main(void) thrust::minstd_rand rng; - thrust::random::experimental::normal_distribution normalDist((float)mean, stddev); + thrust::random::normal_distribution normalDist((float)mean, stddev); // Generate the random values for (size_t i = 0; i < numElems; ++i) { diff --git a/Problem Sets/Problem Set 5/utils.h b/Problem Sets/Problem Set 5/utils.h index 35f954cb..7485a3da 100755 --- a/Problem Sets/Problem Set 5/utils.h +++ b/Problem Sets/Problem Set 5/utils.h @@ -8,6 +8,7 @@ #include #include #include +#include #define checkCudaErrors(val) check( (val), #val, __FILE__, __LINE__) diff --git a/Problem Sets/Problem Set 6/utils.h b/Problem Sets/Problem Set 6/utils.h index 35f954cb..7485a3da 100755 --- a/Problem Sets/Problem Set 6/utils.h +++ b/Problem Sets/Problem Set 6/utils.h @@ -8,6 +8,7 @@ #include #include #include +#include #define checkCudaErrors(val) check( (val), #val, __FILE__, __LINE__)