File indexing completed on 2026-04-09 07:49:18
0001
0002 usage(){ cat << EOU
0003 SIMGStandaloneTest.sh
0004 =======================
0005
0006 1. Loads a 4 channel image (many PNG are 4 channel) using SIMG.h
0007 2. rotates the image using CUDA texture
0008 3. saved rotates image using SIMG.h
0009
0010 ::
0011
0012 ~/o/sysrap/tests/SIMGStandaloneTest.sh /tmp/CaTS.png /tmp/CaTS_rotated.png
0013
0014 EOU
0015 }
0016
0017 cd $(dirname $(realpath $BASH_SOURCE))
0018
0019 pwd
0020
0021 name=SIMGStandaloneTest
0022 bin=/tmp/$name
0023
0024
0025
0026
0027
0028 cuda_prefix=/usr/local/cuda
0029 CUDA_PREFIX=${CUDA_PREFIX:-$cuda_prefix}
0030
0031 nvcc $name.cu \
0032 -lstdc++ \
0033 -std=c++11 \
0034 -I$OPTICKS_PREFIX/include/SysRap \
0035 -I$CUDA_PREFIX/include \
0036 -L$CUDA_PREFIX/lib \
0037 -lcudart \
0038 -o $bin
0039 [ $? -ne 0 ] && echo $BASH_SOURCE " compile FAIL && exit 1
0040
0041 $bin $*
0042 [ $? -ne 0 ] && echo $BASH_SOURCE : run FAIL && exit 2
0043
0044 exit 0
0045