Skip to content

Commit

Permalink
add prediff
Browse files Browse the repository at this point in the history
Signed-off-by: Jade Abraham <[email protected]>
  • Loading branch information
jabraham17 committed Mar 7, 2024
1 parent fc70c31 commit bdb0fe8
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 16 deletions.
23 changes: 23 additions & 0 deletions test/studies/sinLUT/PREDIFF
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash

cp $2 $2.prediff.tmp
> $2

# check that Chapel Calculated == Chapel Lookup
calc=`sed '1q;d' $2.prediff.tmp | sed 's/.*: //'`
lookup=`sed '2q;d' $2.prediff.tmp | sed 's/.*: //'`
if [ "$calc" = "$lookup" ]; then
echo "Chapel Calculated == Chapel Lookup" >> $2
else
echo "Chapel Calculated != Chapel Lookup" >> $2
fi
# check that C Caclulated == C Lookup
calc=`sed '3q;d' $2.prediff.tmp | sed 's/.*: //'`
lookup=`sed '4q;d' $2.prediff.tmp | sed 's/.*: //'`
if [ "$calc" = "$lookup" ]; then
echo "C Calculated == C Lookup" >> $2
else
echo "C Calculated != C Lookup" >> $2
fi

rm $2.prediff.tmp
6 changes: 2 additions & 4 deletions test/studies/sinLUT/chplSin.good
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
Chapel Calculated: -1.2311
Chapel Lookup: -1.2311
C Calculated: -4.23134
C Lookup: -4.23134
Chapel Calculated == Chapel Lookup
C Calculated == C Lookup
6 changes: 2 additions & 4 deletions test/studies/sinLUT/chplSinBlock.good
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
Chapel Calculated: -1.2311
Chapel Lookup: -1.2311
C Calculated: -4.23134
C Lookup: -4.23134
Chapel Calculated == Chapel Lookup
C Calculated == C Lookup
6 changes: 2 additions & 4 deletions test/studies/sinLUT/chplSinReplicated.good
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
Chapel Calculated: -1.2311
Chapel Lookup: -1.2311
C Calculated: -4.23134
C Lookup: -4.23134
Chapel Calculated == Chapel Lookup
C Calculated == C Lookup
6 changes: 2 additions & 4 deletions test/studies/sinLUT/chplSinReplicatedReplicand.good
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
Chapel Calculated: -1.2311
Chapel Lookup: -1.2311
C Calculated: -4.23134
C Lookup: -4.23134
Chapel Calculated == Chapel Lookup
C Calculated == C Lookup

0 comments on commit bdb0fe8

Please sign in to comment.