-
Notifications
You must be signed in to change notification settings - Fork 0
/
inputgen.sh
59 lines (39 loc) · 1.29 KB
/
inputgen.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
declare -a ops=("xadd" "xsub" "xmul" "xdiv" "xmod" "xand" "xoor" "xxor" "xnot" "xshl" "xshr" "xeq" "xiszero" "xlt" "xgt" "xpush")
lcs[0]=32
lcs[1]=16
lcs[2]=8
lcs[3]=4
for op in "${ops[@]}"
do
lc_index=0
# integer simd operations
for (( lw=1; lw<=8; lw*=2 ))
do
for (( lc=2; lc<=lcs[lc_index]; lc*=2 ))
do
tot=$(( 3200000/lc ))
echo "${op} for int, ${tot}, lw=${lw}, lc=${lc}"
sh -c "./ethparser 0 ./ops/${op}/int/LW${lw}/ethRaw.txt ${tot} ./ops/${op}/int/LW${lw}/LC${lc}/ethSimd.txt > ../evmInputs/ops/${op}/int/LW${lw}/LC${lc}/ethSimd.txt"
done
(( lc_index++ ))
done
lc_index=2
# floating simd operations
for (( lw=4; lw<=8; lw*=2 ))
do
for (( lc=2; lc<=lcs[lc_index]; lc*=2 ))
do
tot=$(( 3200000/lc ))
echo "${op} for floating, ${tot}, lw=${lw}, lc=${lc}"
sh -c "./ethparser 0 ./ops/${op}/float/LW${lw}/ethRaw.txt ${tot} ./ops/${op}/float/LW${lw}/LC${lc}/ethSimd.txt > ../evmInputs/ops/${op}/float/LW${lw}/LC${lc}/ethSimd.txt"
done
(( lc_index++ ))
done
# integer scalar operations
for (( lw=1; lw<=8; lw*=2 ))
do
echo "${op} for scalar int, 3200000, lw=${lw}"
sh -c "./ethparser 3200000 ./ops/${op}/int/LW${lw}/ethRaw.txt 0 ./ops/${op}/int/LW${lw}/LC2/ethSimd.txt > ../evmInputs/ops/${op}/int/LW${lw}/ethRaw.txt"
done
done