Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:49:13

0001 #!/bin/bash -l 
0002 
0003 name=insertionSortIndirect 
0004 
0005 
0006 create()
0007 {
0008     local e_path=/tmp/e.npy
0009     if [ -f "$e_path" ]; then
0010        ${OPTICKS_PYTHON:-python} -c "import numpy as np ; np.set_printoptions(suppress=True) ; e = np.load('$e_path') ; print(e) " 
0011     else
0012        ${OPTICKS_PYTHON:-python} -c "import numpy as np ; np.save('$e_path', np.random.sample(1000).astype(np.float32)) " 
0013     fi 
0014 }
0015 
0016 create
0017 
0018 
0019 gcc $name.cc -std=c++11 -lstdc++ -I$OPTICKS_PREFIX/include/SysRap -o /tmp/$name 
0020 [ $? -ne 0 ] && echo $msg compile error && exit 1 
0021 
0022 /tmp/$name
0023 [ $? -ne 0 ] && echo $msg run error && exit 2 
0024 
0025 
0026 if [ -n "$I" ]; then 
0027    ${IPYTHON:-ipython} -i $name.py 
0028 else
0029    ${OPTICKS_PYTHON:-python}  $name.py 
0030 fi 
0031 
0032 
0033 
0034 exit 0 
0035 
0036