 Timestamp:
 07/09/12 17:18:54 (7 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

CDB/trunk/driver/diag_driver_comp.py
r19 r30 258 258 out.writei('DIM_LENGTH=`for DIM in ${DIM_LENGTHS}; do echo $DIM; done  awk \'{if(min==""){min=max=$1}; if($1>max) {max=$1}; if($1<min) {min=$1}} END {print max}\'`\n') 259 259 out.writei('let "DIM_LENGTH = 2"\n') 260 out.writei('STRIDE=`expr $DIM_LENGTH / '+str(self.dim_async)+' + 1`\n') 260 if line.lstrip()[:14].upper() == '#!END PARAFULL': 261 out.writei('STRIDE=1\n') 262 else: 263 out.writei('STRIDE=`expr $DIM_LENGTH / '+str(self.dim_async)+' + 1`\n') 261 264 out.writei('NUM_DIM=0\n') 262 out.writei('while [ "$NUM_DIM" l t "$DIM_LENGTH" ]; do if [ "`expr ${NUM_DIM} + ${STRIDE}`" ge "$DIM_LENGTH" ]; then \\\n')265 out.writei('while [ "$NUM_DIM" le "$DIM_LENGTH" ]; do if [ "`expr ${NUM_DIM} + ${STRIDE} 1`" ge "$DIM_LENGTH" ]; then \\\n') 263 266 out.writei('echo ${NUM_DIM},${DIM_LENGTH}; else echo ${NUM_DIM},`expr ${NUM_DIM} + ${STRIDE}  1`; fi; \\\n') 264 267 out.writei('let "NUM_DIM += ${STRIDE}"; done \\\n')
Note: See TracChangeset
for help on using the changeset viewer.