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

View file

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