-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun-spits-serial.sh
executable file
·42 lines (35 loc) · 1.04 KB
/
run-spits-serial.sh
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
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
############################################
# This is the OpenMP run for the RayTracer #
############################################
# You can either pass scenes individually as arguments or
# leave it blank to run all scenes in the 'scenes' folder
SCENES="${@:1}"
SCENES="${SCENES:-`ls ~/SPITZRayTracer/scenes/*.scn`}"
# Ray tracing parameters
export SUPER_SAMPLES=1
export DEPTH_COMPLEXITY=5
export WIDTH=128
export HEIGHT=72
# Input binary
export PROGDIR="./bin"
export PROGRAM="$PROGDIR/RayTracer_spits"
# Output directory
export OUTDIR="./results/spits-serial"
# Ensure the output directory exists
mkdir -p $OUTDIR
# Iterate through selected scenes and
# run the ray tracer using time
for i in `seq 1 10`;
do
for SCENE in $SCENES
do
FILENAME="$OUTDIR/`basename $SCENE`"
FILENAME="${FILENAME%.*}"
OUTFILE="$FILENAME.tga"
OUTLOG="$FILENAME.log"
OUTTIME="$FILENAME.time"
echo $SCENE...
(time $PROGRAM $SCENE $SUPER_SAMPLES $DEPTH_COMPLEXITY $OUTFILE $WIDTH $HEIGHT) >> $OUTLOG 2>> $OUTTIME
done
done