diff --git a/DEPENDENCIES b/DEPENDENCIES new file mode 100644 index 0000000..e69de29 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e4967e0 --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +.PHONY: all + +all: install + +install: + install -d $(DEST_DIR)/ + install -d $(DEST_DIR)/include/ + for file in include/*; do \ + install -m 644 $$file $(DEST_DIR)/include/; \ + done diff --git a/Makefile.template b/Makefile.template index e64d346..a193e1d 100644 --- a/Makefile.template +++ b/Makefile.template @@ -1,7 +1,7 @@ CC := g++-10 NVCC := nvcc -CFLAGS := -Wall -std=c++17 -fopenmp -MMD -NVCC_FLAGS := -MMD -w -Xcompiler +CFLAGS := -std=c++17 -MMD -Wall -fopenmp +NVCC_FLAGS := -std=c++17 -MMD -Xcudafe="--diag_suppress=20012" -Xcompiler -fopenmp INCLUDE := <> LIBS_DIR := <> @@ -74,7 +74,7 @@ $(TARGET)GPU: $(GPU_BUILD_DIR)/link.o $(GPU_GCC_OBJ) | $(GPU_BUILD_DIR) $(CC) -g -DCUDA $(CFLAGS) $(GPU_NVCC_OBJ) $^ -o $@ $(INC) $(LIB) $(LIB_GPU) $(LD) $(LD_GPU) $(GPU_BUILD_DIR)/link.o: $(GPU_NVCC_OBJ) | $(GPU_BUILD_DIR) - $(NVCC) --device-link $^ -o $@ + $(NVCC) --device-link -lgomp $^ -o $@ $(GPU_BUILD_DIR)/%.cu.o: $(SRC_DIR)/%.cu.cpp | $(GPU_BUILD_DIR) $(NVCC) $(NVCC_FLAGS) -DCUDA -x cu --device-c -o $@ $< $(INC) diff --git a/SETUP b/SETUP new file mode 100755 index 0000000..34bfd4d --- /dev/null +++ b/SETUP @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +if [ -z "$1" ] +then + printf "Usage: setup.sh install_directory [dependencies].\n" 1>&2 + exit 1 +fi + +cd $(dirname $0) +libname=$(basename $(pwd)) +make DEST_DIR="$1" install diff --git a/include/CudaTools/Array.h b/include/Array.h similarity index 100% rename from include/CudaTools/Array.h rename to include/Array.h diff --git a/include/CudaTools/BLAS.h b/include/BLAS.h similarity index 100% rename from include/CudaTools/BLAS.h rename to include/BLAS.h diff --git a/include/CudaTools/Core.h b/include/Core.h similarity index 100% rename from include/CudaTools/Core.h rename to include/Core.h diff --git a/include/CudaTools/Macros.h b/include/Macros.h similarity index 100% rename from include/CudaTools/Macros.h rename to include/Macros.h diff --git a/include/CudaTools/Types.h b/include/Types.h similarity index 100% rename from include/CudaTools/Types.h rename to include/Types.h