Update dgemm_kernel_4x8_haswell.S
[platform/upstream/openblas.git] / utest / utest_main2.c
1 /*****************************************************************************
2 Copyright (c) 2011-2016, The OpenBLAS Project
3 All rights reserved.
4
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are
7 met:
8
9    1. Redistributions of source code must retain the above copyright
10       notice, this list of conditions and the following disclaimer.
11
12    2. Redistributions in binary form must reproduce the above copyright
13       notice, this list of conditions and the following disclaimer in
14       the documentation and/or other materials provided with the
15       distribution.
16    3. Neither the name of the OpenBLAS project nor the names of 
17       its contributors may be used to endorse or promote products 
18       derived from this software without specific prior written 
19       permission.
20
21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
25 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
30 USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
32 **********************************************************************************/
33
34 #include <stdio.h>
35 #include <complex.h>
36
37 #define CTEST_MAIN
38 #define CTEST_SEGFAULT
39 #define CTEST_ADD_TESTS_MANUALLY
40
41 #include "openblas_utest.h"
42
43 CTEST(amax, samax){
44   blasint N=3, inc=1;
45   float te_max=0.0, tr_max=0.0;
46   float x[]={-1.1, 2.2, -3.3};
47   te_max=BLASFUNC(samax)(&N, x, &inc);
48   tr_max=3.3;
49   
50   ASSERT_DBL_NEAR_TOL((double)(tr_max), (double)(te_max), SINGLE_EPS);
51 }
52
53 CTEST (drotmg,rotmg)
54 {
55         double te_d1, tr_d1;
56         double te_d2, tr_d2;
57         double te_x1, tr_x1;
58         double te_y1, tr_y1;
59         double te_param[5];
60         double tr_param[5];
61         int i=0;
62         // original test case for libGoto bug fixed by feb2014 rewrite
63         te_d1= 0.21149573940783739;
64         te_d2= 0.046892057172954082;
65         te_x1= -0.42272687517106533;
66         te_y1= 0.42211309121921659;
67
68
69         for(i=0; i<5; i++){
70           te_param[i]=tr_param[i]=0.0;
71         }
72
73         //reference values as calculated by netlib blas
74
75         tr_d1= 0.1732048;
76         tr_d2= 0.03840234;
77         tr_x1= -0.516180;
78         tr_y1= 0.422113;
79         tr_d1= 0.17320483687975;
80         tr_d2= 0.03840233915037;
81         tr_x1= -0.51618034832329;
82         tr_y1= 0.42211309121922;
83
84         tr_param[0]= 0.0;
85         tr_param[1]= 0.0;
86         tr_param[2]= 0.99854803659786; 
87         tr_param[3]= -0.22139439665872;
88         tr_param[4]= 0.0;
89
90         BLASFUNC(drotmg)(&te_d1, &te_d2, &te_x1, &te_y1, te_param);
91         ASSERT_DBL_NEAR_TOL(tr_d1, te_d1, DOUBLE_EPS);
92         ASSERT_DBL_NEAR_TOL(tr_d2, te_d2, DOUBLE_EPS);
93         ASSERT_DBL_NEAR_TOL(tr_x1, te_x1, DOUBLE_EPS);
94         ASSERT_DBL_NEAR_TOL(tr_y1, te_y1, DOUBLE_EPS);
95
96         for(i=0; i<5; i++){
97                 ASSERT_DBL_NEAR_TOL(tr_param[i], te_param[i], DOUBLE_EPS);
98         }
99 }
100
101 CTEST (drotmg,rotmg_issue1452)
102 {
103         double te_d1, tr_d1;
104         double te_d2, tr_d2;
105         double te_x1, tr_x1;
106         double te_y1, tr_y1;
107         double te_param[5];
108         double tr_param[5];
109         int i=0;
110
111         // from issue #1452
112         te_d1 = 5.9e-8;
113         te_d2 = 5.960464e-8;
114         te_x1 = 1.0;
115         te_y1 = 150.0;
116
117         for(i=0; i<5; i++){
118           te_param[i]=tr_param[i]=0.0;
119         }
120         te_param[3]=1./4096.;
121         //reference values as calculated by gonum blas with rotmg rewritten to Hopkins' algorithm
122         tr_d1= 0.99995592822897;
123         tr_d2= 0.98981219860583;
124         tr_x1= 0.03662270484346;
125         tr_y1= 150.000000000000;
126
127         tr_param[0]= -1.0;
128         tr_param[1]= 0.00000161109346;
129         tr_param[2]= -0.00024414062500;
130         tr_param[3]= 0.00024414062500;
131         tr_param[4]= 0.00000162760417;
132
133         //OpenBLAS
134         BLASFUNC(drotmg)(&te_d1, &te_d2, &te_x1, &te_y1, te_param);
135
136         ASSERT_DBL_NEAR_TOL(tr_d1, te_d1, DOUBLE_EPS);
137         ASSERT_DBL_NEAR_TOL(tr_d2, te_d2, DOUBLE_EPS);
138         ASSERT_DBL_NEAR_TOL(tr_x1, te_x1, DOUBLE_EPS);
139         ASSERT_DBL_NEAR_TOL(tr_y1, te_y1, DOUBLE_EPS);
140
141         for(i=0; i<5; i++){
142                 ASSERT_DBL_NEAR_TOL(tr_param[i], te_param[i], DOUBLE_EPS);
143         }
144
145 }
146
147 CTEST(drotmg, rotmg_D1eqD2_X1eqX2)
148 {
149         double te_d1, tr_d1;
150         double te_d2, tr_d2;
151         double te_x1, tr_x1;
152         double te_y1, tr_y1;
153         double te_param[5];
154         double tr_param[5];
155         int i=0;
156         te_d1= tr_d1=2.;
157         te_d2= tr_d2=2.;
158         te_x1= tr_x1=8.;
159         te_y1= tr_y1=8.;
160
161         for(i=0; i<5; i++){
162           te_param[i]=tr_param[i]=0.0;
163         }
164         
165         //reference values as calculated by netlib blas
166         tr_d1= 1.0;
167         tr_d2= 1.0;
168         tr_x1= 16.0;
169         tr_y1= 8.0;
170
171         tr_param[0]=1.0;
172         tr_param[1]=1.0;
173         tr_param[2]=0.0;
174         tr_param[3]=0.0;
175         tr_param[4]=1.0;
176
177         //OpenBLAS
178         BLASFUNC(drotmg)(&te_d1, &te_d2, &te_x1, &te_y1, te_param);
179
180         ASSERT_DBL_NEAR_TOL(tr_d1, te_d1, DOUBLE_EPS);
181         ASSERT_DBL_NEAR_TOL(tr_d2, te_d2, DOUBLE_EPS);
182         ASSERT_DBL_NEAR_TOL(tr_x1, te_x1, DOUBLE_EPS);
183         ASSERT_DBL_NEAR_TOL(tr_y1, te_y1, DOUBLE_EPS);
184
185         for(i=0; i<5; i++){
186                 ASSERT_DBL_NEAR_TOL(tr_param[i], te_param[i], DOUBLE_EPS);
187         }
188 }
189
190 CTEST(drotmg, drotmg_D1_big_D2_big_flag_zero)
191 {
192         double te_d1, tr_d1;
193         double te_d2, tr_d2;
194         double te_x1, tr_x1;
195         double te_y1, tr_y1;
196         double te_param[5]={1.,4096.,-4096.,1.,4096.};
197         double tr_param[5]={-1.,4096.,-3584.,1792.,4096.};
198         int i=0;
199         te_d1= tr_d1=1600000000.;
200         te_d2= tr_d2=800000000.;
201         te_x1= tr_x1=8.;
202         te_y1= tr_y1=7.;
203
204         
205         //reference values as calculated by gonum 
206         tr_d1= 68.96627824858757;
207         tr_d2= 34.483139124293785;
208         tr_x1= 45312.;
209         tr_y1= 7.0;
210
211
212         //OpenBLAS
213         BLASFUNC(drotmg)(&te_d1, &te_d2, &te_x1, &te_y1, te_param);
214
215         ASSERT_DBL_NEAR_TOL(tr_d1, te_d1, DOUBLE_EPS);
216         ASSERT_DBL_NEAR_TOL(tr_d2, te_d2, DOUBLE_EPS);
217         ASSERT_DBL_NEAR_TOL(tr_x1, te_x1, DOUBLE_EPS);
218         ASSERT_DBL_NEAR_TOL(tr_y1, te_y1, DOUBLE_EPS);
219
220         for(i=0; i<5; i++){
221                 ASSERT_DBL_NEAR_TOL(tr_param[i], te_param[i], DOUBLE_EPS);
222         }
223 }
224
225 CTEST(axpy,daxpy_inc_0)
226 {
227         blasint i;
228         blasint N=8,incX=0,incY=0;
229         double a=0.25;
230         double x1[]={1.0,3.0,5.0,7.0,1.0,3.0,5.0,7.0};
231         double y1[]={2.0,4.0,6.0,8.0,2.0,4.0,6.0,8.0};
232
233         double x2[]={1.0,3.0,5.0,7.0,1.0,3.0,5.0,7.0};
234         double y2[]={4.0,4.0,6.0,8.0,2.0,4.0,6.0,8.0};
235
236         //OpenBLAS
237         BLASFUNC(daxpy)(&N,&a,x1,&incX,y1,&incY);
238
239         for(i=0; i<N; i++){
240                 ASSERT_DBL_NEAR_TOL(x2[i], x1[i], DOUBLE_EPS);
241                 ASSERT_DBL_NEAR_TOL(y2[i], y1[i], DOUBLE_EPS);
242         }
243 }
244
245 CTEST(axpy,zaxpy_inc_0)
246 {
247         blasint i;
248         blasint N=4,incX=0,incY=0;
249         double a[2]={0.25,0.5};
250         double x1[]={1.0,3.0,5.0,7.0,1.0,3.0,5.0,7.0};
251         double y1[]={2.0,4.0,6.0,8.0,2.0,4.0,6.0,8.0};
252         double x2[]={1.0,3.0,5.0,7.0,1.0,3.0,5.0,7.0};
253         double y2[]={-3.0,9.0,6.0,8.0,2.0,4.0,6.0,8.0};
254
255         //OpenBLAS
256         BLASFUNC(zaxpy)(&N,a,x1,&incX,y1,&incY);
257
258         for(i=0; i<2*N; i++){
259                 ASSERT_DBL_NEAR_TOL(x2[i], x1[i], DOUBLE_EPS);
260                 ASSERT_DBL_NEAR_TOL(y2[i], y1[i], DOUBLE_EPS);
261         }
262 }
263
264 CTEST(axpy,saxpy_inc_0)
265 {
266         blasint i;
267         blasint N=8,incX=0,incY=0;
268         float a=0.25;
269         float x1[]={1.0,3.0,5.0,7.0,1.0,3.0,5.0,7.0};
270         float y1[]={2.0,4.0,6.0,8.0,2.0,4.0,6.0,8.0};
271         float x2[]={1.0,3.0,5.0,7.0,1.0,3.0,5.0,7.0};
272         float y2[]={4.0,4.0,6.0,8.0,2.0,4.0,6.0,8.0};
273
274         //OpenBLAS
275         BLASFUNC(saxpy)(&N,&a,x1,&incX,y1,&incY);
276
277         for(i=0; i<N; i++){
278                 ASSERT_DBL_NEAR_TOL(x2[i], x1[i], DOUBLE_EPS);
279                 ASSERT_DBL_NEAR_TOL(y2[i], y1[i], DOUBLE_EPS);
280         }
281 }
282
283 CTEST(axpy,caxpy_inc_0)
284 {
285         blasint i;
286         blasint N=4,incX=0,incY=0;
287         float a[2]={0.25,0.5};
288         float x1[]={1.0,3.0,5.0,7.0,1.0,3.0,5.0,7.0};
289         float y1[]={2.0,4.0,6.0,8.0,2.0,4.0,6.0,8.0};
290         float x2[]={1.0,3.0,5.0,7.0,1.0,3.0,5.0,7.0};
291         float y2[]={-3.0,9.0,6.0,8.0,2.0,4.0,6.0,8.0};
292
293         //OpenBLAS
294         BLASFUNC(caxpy)(&N,a,x1,&incX,y1,&incY);
295
296         for(i=0; i<2*N; i++){
297                 ASSERT_DBL_NEAR_TOL(x2[i], x1[i], DOUBLE_EPS);
298                 ASSERT_DBL_NEAR_TOL(y2[i], y1[i], DOUBLE_EPS);
299         }
300 }
301
302 CTEST( zdotu,zdotu_n_1)
303 {
304         blasint N=1,incX=1,incY=1;
305         double x1[]={1.0,1.0};
306         double y1[]={1.0,2.0};
307         openblas_complex_double result1=openblas_make_complex_double(0.0,0.0);
308         openblas_complex_double result2=openblas_make_complex_double(-1.0,3.0);
309 #ifdef RETURN_BY_STACK
310         BLASFUNC(zdotu)(&result1,&N,x1,&incX,y1,&incY);
311 #else
312         result1=BLASFUNC(zdotu)(&N,x1,&incX,y1,&incY);
313 #endif
314         
315 #ifdef OPENBLAS_COMPLEX_STRUCT
316         ASSERT_DBL_NEAR_TOL(result2.real, result1.real, DOUBLE_EPS);
317         ASSERT_DBL_NEAR_TOL(result2.imag, result1.imag, DOUBLE_EPS);
318 #else
319         ASSERT_DBL_NEAR_TOL(creal(result2), creal(result1), DOUBLE_EPS);
320         ASSERT_DBL_NEAR_TOL(cimag(result2), cimag(result1), DOUBLE_EPS);
321 #endif
322 }
323
324 CTEST(zdotu, zdotu_offset_1)
325 {
326         blasint N=1,incX=1,incY=1;
327         double x1[]={1.0,2.0,3.0,4.0};
328         double y1[]={5.0,6.0,7.0,8.0};
329         openblas_complex_double result1=openblas_make_complex_double(0.0,0.0);
330         openblas_complex_double result2=openblas_make_complex_double(-9.0,32.0);
331 #ifdef RETURN_BY_STACK
332         BLASFUNC(zdotu)(&result1,&N,x1+1,&incX,y1+1,&incY);
333 #else
334         result1=BLASFUNC(zdotu)(&N,x1+1,&incX,y1+1,&incY);
335 #endif
336         
337 #ifdef OPENBLAS_COMPLEX_STRUCT
338         ASSERT_DBL_NEAR_TOL(result2.real, result1.real, DOUBLE_EPS);
339         ASSERT_DBL_NEAR_TOL(result2.imag, result1.imag, DOUBLE_EPS);
340 #else
341         ASSERT_DBL_NEAR_TOL(creal(result2), creal(result1), DOUBLE_EPS);
342         ASSERT_DBL_NEAR_TOL(cimag(result2), cimag(result1), DOUBLE_EPS);
343 #endif
344 }
345
346 CTEST(dsdot,dsdot_n_1)
347 {
348         float x= 0.172555164F;
349         float y= -0.0138700781F;
350         blasint incx=1;
351         blasint incy=1;
352         blasint n=1;
353
354         double res1=0.0f, res2=-0.00239335360107;
355
356         res1=BLASFUNC(dsdot)(&n, &x, &incx, &y, &incy);
357         ASSERT_DBL_NEAR_TOL(res2, res1, DOUBLE_EPS);
358
359 }
360
361 CTEST(rot,drot_inc_0)
362 {
363         blasint i=0;
364         blasint N=4,incX=0,incY=0;
365         double c=0.25,s=0.5;
366         double x1[]={1.0,3.0,5.0,7.0};
367         double y1[]={2.0,4.0,6.0,8.0};
368         double x2[]={-0.21484375000000,3.0,5.0,7.0};
369         double y2[]={ 0.03906250000000,4.0,6.0,8.0};
370
371
372         //OpenBLAS
373         BLASFUNC(drot)(&N,x1,&incX,y1,&incY,&c,&s);
374
375         for(i=0; i<N; i++){
376                 ASSERT_DBL_NEAR_TOL(x2[i], x1[i], DOUBLE_EPS);
377                 ASSERT_DBL_NEAR_TOL(y2[i], y1[i], DOUBLE_EPS);
378         }
379 }
380
381 CTEST(rot,zdrot_inc_0)
382 {
383         blasint i=0;
384         blasint N=4,incX=0,incY=0;
385         double c=0.25,s=0.5;
386         double x1[]={1.0,3.0,5.0,7.0,1.0,3.0,5.0,7.0};
387         double y1[]={2.0,4.0,6.0,8.0,2.0,4.0,6.0,8.0};
388         double x2[]={-0.21484375000000,-0.45703125000000 ,5.0,7.0,1.0,3.0,5.0,7.0};
389         double y2[]={ 0.03906250000000, 0.17187500000000 ,6.0,8.0,2.0,4.0,6.0,8.0};
390         
391
392         //OpenBLAS
393         BLASFUNC(zdrot)(&N,x1,&incX,y1,&incY,&c,&s);
394
395         for(i=0; i<2*N; i++){
396                 ASSERT_DBL_NEAR_TOL(x2[i], x1[i], DOUBLE_EPS);
397                 ASSERT_DBL_NEAR_TOL(y2[i], y1[i], DOUBLE_EPS);
398         }
399 }
400
401 CTEST(rot,srot_inc_0)
402 {
403         blasint i=0;
404         blasint N=4,incX=0,incY=0;
405         float c=0.25,s=0.5;
406         float x1[]={1.0,3.0,5.0,7.0};
407         float y1[]={2.0,4.0,6.0,8.0};
408         float x2[]={-0.21484375000000,3.0,5.0,7.0};
409         float y2[]={ 0.03906250000000,4.0,6.0,8.0};
410
411         //OpenBLAS
412         BLASFUNC(srot)(&N,x1,&incX,y1,&incY,&c,&s);
413
414         for(i=0; i<N; i++){
415                 ASSERT_DBL_NEAR_TOL(x2[i], x1[i], SINGLE_EPS);
416                 ASSERT_DBL_NEAR_TOL(y2[i], y1[i], SINGLE_EPS);
417         }
418 }
419
420 CTEST(rot, csrot_inc_0)
421 {
422         blasint i=0;
423         blasint N=4,incX=0,incY=0;
424         float c=0.25,s=0.5;
425         float x1[]={1.0,3.0,5.0,7.0,1.0,3.0,5.0,7.0};
426         float y1[]={2.0,4.0,6.0,8.0,2.0,4.0,6.0,8.0};
427         float x2[]={-0.21484375000000,-0.45703125000000 ,5.0,7.0,1.0,3.0,5.0,7.0};
428         float y2[]={ 0.03906250000000, 0.17187500000000 ,6.0,8.0,2.0,4.0,6.0,8.0};
429         
430         //OpenBLAS
431         BLASFUNC(csrot)(&N,x1,&incX,y1,&incY,&c,&s);
432
433         for(i=0; i<2*N; i++){
434                 ASSERT_DBL_NEAR_TOL(x2[i], x1[i], SINGLE_EPS);
435                 ASSERT_DBL_NEAR_TOL(y2[i], y1[i], SINGLE_EPS);
436         }
437 }
438
439 CTEST(swap,dswap_inc_0)
440 {
441         blasint i=0;
442         blasint N=4,incX=0,incY=0;
443         double x1[]={1.0,3.0,5.0,7.0};
444         double y1[]={2.0,4.0,6.0,8.0};
445         double x2[]={1.0,3.0,5.0,7.0};
446         double y2[]={2.0,4.0,6.0,8.0};
447         
448         //OpenBLAS
449         BLASFUNC(dswap)(&N,x1,&incX,y1,&incY);
450
451         for(i=0; i<N; i++){
452                 ASSERT_DBL_NEAR_TOL(x2[i], x1[i], DOUBLE_EPS);
453                 ASSERT_DBL_NEAR_TOL(y2[i], y1[i], DOUBLE_EPS);
454         }
455 }
456
457 CTEST(swap,zswap_inc_0)
458 {
459         blasint i=0;
460         blasint N=4,incX=0,incY=0;
461         double x1[]={1.0,3.0,5.0,7.0,1.0,3.0,5.0,7.0};
462         double y1[]={2.0,4.0,6.0,8.0,2.0,4.0,6.0,8.0};
463         double x2[]={1.0,3.0,5.0,7.0,1.0,3.0,5.0,7.0};
464         double y2[]={2.0,4.0,6.0,8.0,2.0,4.0,6.0,8.0};
465
466         //OpenBLAS
467         BLASFUNC(zswap)(&N,x1,&incX,y1,&incY);
468
469         for(i=0; i<2*N; i++){
470                 ASSERT_DBL_NEAR_TOL(x2[i], x1[i], DOUBLE_EPS);
471                 ASSERT_DBL_NEAR_TOL(y2[i], y1[i], DOUBLE_EPS);
472         }
473 }
474
475 CTEST(swap,sswap_inc_0)
476 {
477         blasint i=0;
478         blasint N=4,incX=0,incY=0;
479         float x1[]={1.0,3.0,5.0,7.0};
480         float y1[]={2.0,4.0,6.0,8.0};
481         float x2[]={1.0,3.0,5.0,7.0};
482         float y2[]={2.0,4.0,6.0,8.0};
483
484         //OpenBLAS
485         BLASFUNC(sswap)(&N,x1,&incX,y1,&incY);
486
487         for(i=0; i<N; i++){
488                 ASSERT_DBL_NEAR_TOL(x2[i], x1[i], SINGLE_EPS);
489                 ASSERT_DBL_NEAR_TOL(y2[i], y1[i], SINGLE_EPS);
490         }
491 }
492
493 CTEST(swap,cswap_inc_0)
494 {
495         blasint i=0;
496         blasint N=4,incX=0,incY=0;
497         float x1[]={1.0,3.0,5.0,7.0,1.0,3.0,5.0,7.0};
498         float y1[]={2.0,4.0,6.0,8.0,2.0,4.0,6.0,8.0};
499         float x2[]={1.0,3.0,5.0,7.0,1.0,3.0,5.0,7.0};
500         float y2[]={2.0,4.0,6.0,8.0,2.0,4.0,6.0,8.0};
501
502         //OpenBLAS
503         BLASFUNC(cswap)(&N,x1,&incX,y1,&incY);
504
505         for(i=0; i<2*N; i++){
506                 ASSERT_DBL_NEAR_TOL(x2[i], x1[i], SINGLE_EPS);
507                 ASSERT_DBL_NEAR_TOL(y2[i], y1[i], SINGLE_EPS);
508         }
509 }
510
511 int main(int argc, const char ** argv){
512
513   CTEST_ADD(amax, samax);
514   CTEST_ADD (drotmg,rotmg);
515   CTEST_ADD (drotmg,rotmg_issue1452);
516   CTEST_ADD (drotmg,rotmg_D1eqD2_X1eqX2);
517   CTEST_ADD (drotmg,drotmg_D1_big_D2_big_flag_zero);
518   CTEST_ADD (axpy,daxpy_inc_0);
519   CTEST_ADD (axpy,zaxpy_inc_0);
520   CTEST_ADD (axpy,saxpy_inc_0);
521   CTEST_ADD (axpy,caxpy_inc_0);
522   CTEST_ADD (zdotu,zdotu_n_1);
523   CTEST_ADD (zdotu,zdotu_offset_1);
524   CTEST_ADD (dsdot,dsdot_n_1);
525   CTEST_ADD (rot,drot_inc_0);
526   CTEST_ADD (rot,zdrot_inc_0);
527   CTEST_ADD (rot,srot_inc_0);
528   CTEST_ADD (rot,csrot_inc_0);
529   CTEST_ADD (swap,dswap_inc_0);
530   CTEST_ADD (swap,zswap_inc_0);
531   CTEST_ADD (swap,sswap_inc_0);
532   CTEST_ADD (swap,cswap_inc_0);
533
534   int num_fail=0;
535
536   num_fail=ctest_main(argc, argv);
537
538   return num_fail;
539 }