forked from bjwbell/gensimd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_examples.sh
executable file
·115 lines (107 loc) · 1.31 KB
/
run_examples.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#!/bin/sh
echo "Installing gensimd, gensimd/simd, gensimd/simd/sse2"
go install ./simd/sse2 ./simd
go generate
go install
echo "Running simd_example"
cd examples/simd_example
rm -f *.s
go generate
if [ $? != 0 ]
then exit 1
fi
go build
if [ $? != 0 ]
then exit 1
fi
./simd_example
if [ $? != 0 ]
then exit 1
fi
go clean
cd ../..
echo "Running sse2_example"
cd examples/sse2_example
rm -f *.s
go generate
if [ $? != 0 ]
then exit 1
fi
go build
if [ $? != 0 ]
then exit 1
fi
./sse2_example
if [ $? != 0 ]
then exit 1
fi
go clean
cd ../..
echo "Running distsq"
cd examples/distsq
rm -f *.s
go generate
if [ $? != 0 ]
then exit 1
fi
go build
if [ $? != 0 ]
then exit 1
fi
./distsq
if [ $? != 0 ]
then exit 1
fi
go clean
cd ../../
echo "Running reg_spill1"
cd examples/reg_spill1
rm -f *.s
go generate
if [ $? != 0 ]
then exit 1
fi
go build
if [ $? != 0 ]
then exit 1
fi
./reg_spill1
if [ $? != 0 ]
then exit 1
fi
go clean
cd ../../
echo "Running reg_spill2"
cd examples/reg_spill2
rm -f *.s
go generate
if [ $? != 0 ]
then exit 1
fi
go build
if [ $? != 0 ]
then exit 1
fi
./reg_spill2
if [ $? != 0 ]
then exit 1
fi
go clean
cd ../../
echo "Running reg_spill3"
cd examples/reg_spill3
rm -f *.s
go generate
if [ $? != 0 ]
then exit 1
fi
go build
if [ $? != 0 ]
then exit 1
fi
./reg_spill3
if [ $? != 0 ]
then exit 1
fi
go clean
cd ../../