-
Notifications
You must be signed in to change notification settings - Fork 59
/
blas1_s_prb_output.txt
393 lines (299 loc) · 8.96 KB
/
blas1_s_prb_output.txt
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
January 3 2011 8:44:50.873 AM
BLAS1_S_PRB:
FORTRAN90 version
Test the BLAS1 library.
TEST01
ISAMAX returns the index of the entry of
maximum magnitude in a single precision real vector.
The vector X:
1 2.0000
2 -2.0000
3 5.0000
4 1.0000
5 -3.0000
6 4.0000
7 0.0000
8 -4.0000
9 3.0000
10 -1.0000
11 -5.0000
The index of maximum magnitude = 3
TEST02
Use ISAMAX, SAXPY and SSCAL
in a Gauss elimination routine.
First five entries of solution:
1.00000 2.00000 3.00000 4.00000 5.00000
TEST03
SASUM adds the absolute values of elements
of a single precision real vector.
X =
1 -2.00000
2 4.00000
3 -6.00000
4 8.00000
5 -10.0000
6 12.0000
7 -14.0000
8 16.0000
9 -18.0000
10 20.0000
SASUM ( NX, X, 1 ) = 110.000
SASUM ( NX/2, X, 2 ) = 50.0000
SASUM ( 2, X, NX/2 ) = 14.0000
Demonstrate with a matrix A:
11.0000 -12.0000 13.0000 -14.0000
-21.0000 22.0000 -23.0000 24.0000
31.0000 -32.0000 33.0000 -34.0000
-41.0000 42.0000 -43.0000 44.0000
51.0000 -52.0000 53.0000 -54.0000
SASUM(MA,A(1,2),1) = 160.000
SASUM(NA,A(2,1),LDA) = 90.0000
TEST04
SAXPY adds a multiple of
one single precision real vector to another.
X =
1 1.00000
2 2.00000
3 3.00000
4 4.00000
5 5.00000
6 6.00000
Y =
1 100.000
2 200.000
3 300.000
4 400.000
5 500.000
6 600.000
SAXPY ( N, 1.0000, X, 1, Y, 1 )
1 101.000
2 202.000
3 303.000
4 404.000
5 505.000
6 606.000
SAXPY ( N, -2.0000, X, 1, Y, 1 )
1 98.0000
2 196.000
3 294.000
4 392.000
5 490.000
6 588.000
SAXPY ( 3, 3.0000, X, 2, Y, 1 )
1 103.000
2 209.000
3 315.000
4 400.000
5 500.000
6 600.000
SAXPY ( 3, -4.0000, X, 1, Y, 2 )
1 96.0000
2 200.000
3 292.000
4 400.000
5 488.000
6 600.000
TEST05
SCOPY copies a single precision real vector.
X =
1 1.00000
2 2.00000
3 3.00000
4 4.00000
5 5.00000
6 6.00000
7 7.00000
8 8.00000
9 9.00000
10 10.0000
Y =
1 10.0000
2 20.0000
3 30.0000
4 40.0000
5 50.0000
6 60.0000
7 70.0000
8 80.0000
9 90.0000
10 100.000
A =
11.00 12.00 13.00 14.00 15.00
21.00 22.00 23.00 24.00 25.00
31.00 32.00 33.00 34.00 35.00
41.00 42.00 43.00 44.00 45.00
51.00 52.00 53.00 54.00 55.00
SCOPY ( 5, X, 1, Y, 1 )
1 1.00000
2 2.00000
3 3.00000
4 4.00000
5 5.00000
6 60.0000
7 70.0000
8 80.0000
9 90.0000
10 100.000
SCOPY ( 3, X, 2, Y, 3 )
1 1.00000
2 20.0000
3 30.0000
4 3.00000
5 50.0000
6 60.0000
7 5.00000
8 80.0000
9 90.0000
10 100.000
SCOPY ( 5, X, 1, A, 1 )
A =
1.00 12.00 13.00 14.00 15.00
2.00 22.00 23.00 24.00 25.00
3.00 32.00 33.00 34.00 35.00
4.00 42.00 43.00 44.00 45.00
5.00 52.00 53.00 54.00 55.00
SCOPY ( 5, X, 2, A, 5 )
A =
1.00 3.00 5.00 7.00 9.00
21.00 22.00 23.00 24.00 25.00
31.00 32.00 33.00 34.00 35.00
41.00 42.00 43.00 44.00 45.00
51.00 52.00 53.00 54.00 55.00
TEST06
SDOT computes the dot product of
single precision real vectors.
Dot product of X and Y is -55.0000
Product of row 2 of A and X is 85.0000
Product of column 2 of A and X is 85.0000
Matrix product computed with SDOT:
50.0000 30.0000 10.0000 -10.0000 -30.0000
60.0000 35.0000 10.0000 -15.0000 -40.0000
70.0000 40.0000 10.0000 -20.0000 -50.0000
80.0000 45.0000 10.0000 -25.0000 -60.0000
90.0000 50.0000 10.0000 -30.0000 -70.0000
TEST07
SMACH computes several machine-dependent
single precision real arithmetic parameters.
SMACH(1) = machine epsilon = 1.19209290E-07
SMACH(2) = a tiny value = 2.35098870E-36
SMACH(3) = a huge value = 4.25352949E+35
FORTRAN90 parameters:
EPSILON() = machine epsilon = 1.19209290E-07
TINY() = a tiny value = 1.17549435E-38
HUGE() = a huge value = 3.40282347E+38
TEST08
SNRM2 computes the Euclidean norm of
a single precision real vector.
The vector X:
1 1.0000
2 2.0000
3 3.0000
4 4.0000
5 5.0000
The 2-norm of X is 7.41620
The 2-norm of row 2 of A is 11.6189
The 2-norm of column 2 of A is 11.6189
TEST09
SROT carries out a single precision real Givens rotation.
X and Y
1 1.00000 -11.0000
2 2.00000 -8.00000
3 3.00000 -3.00000
4 4.00000 4.00000
5 5.00000 13.0000
6 6.00000 24.0000
SROT ( N, X, 1, Y, 1, 0.5000, 0.8660 )
1 -9.02628 -6.36603
2 -5.92820 -5.73205
3 -1.09808 -4.09808
4 5.46410 -1.46410
5 13.7583 2.16987
6 23.7846 6.80385
SROT ( N, X, 1, Y, 1, 0.0905, -0.9959 )
1 11.0454 -0.596046E-07
2 8.14822 1.26750
3 3.25929 2.71607
4 -3.62143 4.34572
5 -12.4939 6.15643
6 -23.3582 8.14822
TEST10
SROTG generates a single precision real Givens rotation
( C S ) * ( A ) = ( R )
( -S C ) ( B ) ( 0 )
A = 0.218418 B = 0.956318
C = 0.222661 S = 0.974896
R = 0.980943 Z = 4.49112
C*A+S*B = 0.980943
-S*A+C*B = 0.00000
A = 0.829509 B = 0.561695
C = 0.828025 S = 0.560691
R = 1.00179 Z = 0.560691
C*A+S*B = 1.00179
-S*A+C*B = 0.298023E-07
A = 0.415307 B = 0.661187E-01
C = 0.987563 S = 0.157224
R = 0.420537 Z = 0.157224
C*A+S*B = 0.420537
-S*A+C*B = 0.00000
A = 0.257578 B = 0.109957
C = 0.919705 S = 0.392611
R = 0.280066 Z = 0.392611
C*A+S*B = 0.280066
-S*A+C*B = 0.00000
A = 0.438290E-01 B = 0.633966
C = 0.689700E-01 S = 0.997619
R = 0.635479 Z = 14.4991
C*A+S*B = 0.635479
-S*A+C*B = -0.372529E-08
TEST11
SSCAL multiplies a single precision real scalar times
a single precision real vector.
X =
1 1.00000
2 2.00000
3 3.00000
4 4.00000
5 5.00000
6 6.00000
SSCAL ( N, 5.0000, X, 1 )
1 5.00000
2 10.0000
3 15.0000
4 20.0000
5 25.0000
6 30.0000
SSCAL ( 3, -2.0000, X, 2 )
1 -2.00000
2 2.00000
3 -6.00000
4 4.00000
5 -10.0000
6 6.00000
TEST12
SSWAP swaps two single precision real vectors.
X and Y
1 1.00000 100.000
2 2.00000 200.000
3 3.00000 300.000
4 4.00000 400.000
5 5.00000 500.000
6 6.00000 600.000
SSWAP ( N, X, 1, Y, 1 )
X and Y
1 100.000 1.00000
2 200.000 2.00000
3 300.000 3.00000
4 400.000 4.00000
5 500.000 5.00000
6 600.000 6.00000
SSWAP ( 3, X, 2, Y, 1 )
X and Y
1 100.000 1.00000
2 2.00000 3.00000
3 200.000 5.00000
4 4.00000 400.000
5 300.000 500.000
6 6.00000 600.000
BLAS1_S_PRB:
Normal end of execution.
January 3 2011 8:44:50.875 AM