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

25
gpu/tp5/c/build.sh Executable file
View file

@ -0,0 +1,25 @@
#!/bin/sh
cd "$(dirname "$(realpath "$0")")"
set -e
alias log="echo '[build.sh]'"
TARGET="main.cu"
MODULES="matrix.cu"
if [ $# -gt 0 ]
then targets="$@"
else targets="$TARGET"
fi
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)"
rm -f bin/${target}.out
nvcc $ccargs -o bin/${target}.out $modules $inputs
done