This commit is contained in:
JOLIMAITRE Matthieu 2024-03-28 17:58:33 +01:00
parent 8b3bb9c382
commit d976cfaf74
37 changed files with 2669 additions and 371 deletions

26
gpu/tp4/c/build.sh Executable file
View file

@ -0,0 +1,26 @@
#!/bin/sh
cd "$(dirname "$(realpath "$0")")"
set -e
alias log="echo '[build.sh]'"
TARGET="ex1.cu ex2.cu ex3.cu"
MODULES="conv.cu"
if [ $# -gt 0 ]
then targets="$@"
else targets="$TARGET"
fi
rm -fr bin
mkdir -p bin
ccargs="-O2"
#ccargs="$ccargs -g -G -Xcompiler -fsanitize=address"
for target in $targets
do
sources="$MODULES $target"
inputs="$(for src in $sources; do echo "src/$src"; done | xargs)"
nvcc $ccargs -o bin/${target}.out $modules $inputs
./bin/${target}.out
done