-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcuda_samples.sh
More file actions
executable file
·30 lines (30 loc) · 1.1 KB
/
cuda_samples.sh
File metadata and controls
executable file
·30 lines (30 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
if [ "$CUDA_SAMPLES" = "" ]; then
echo "Error:"
echo "CUDA_SAMPLES environmental variable not defined."
echo "Be sure that you have installed NVIDIA CUDA SAMPLES"
echo "and set CUDA_SAMPLES to the path where they are installed."
echo "For instance, in Linux you can add to your .bashrc file:"
echo "export CUDA_SAMPLES=/path-to-samples/NVIDIA_CUDA-7.5_Samples/"
exit
fi
if [ ! -f $CUDA_SAMPLES/6_Advanced/scan/scan.cu ]; then
echo "Error:"
echo "File $CUDA_SAMPLES/6_Advanced/scan/scan.cu not found"
exit
fi
if [ ! -f $CUDA_SAMPLES/6_Advanced/scan/scan_common.h ]; then
echo "Error:"
echo "File $CUDA_SAMPLES/6_Advanced/scan/scan_common.h not found"
exit
fi
if [ ! -f $CUDA_SAMPLES/common/inc/helper_cuda.h ]; then
echo "Error:"
echo "File $CUDA_SAMPLES/common/inc/helper_cuda.h not found"
exit
fi
if [ ! -f $CUDA_SAMPLES/common/inc/helper_string.h ]; then
echo "Error:"
echo "File $CUDA_SAMPLES/common/inc/helper_string.h not found"
exit
fi
cat $CUDA_SAMPLES/6_Advanced/scan/scan.cu | sed 's/THREADBLOCK_SIZE 256/THREADBLOCK_SIZE 1024/' > scan_tmp.cu