@@ -74,6 +74,26 @@ CTEST(axpy,zaxpy_inc_0)
74
74
ASSERT_DBL_NEAR_TOL (y2 [i ], y1 [i ], DOUBLE_EPS );
75
75
}
76
76
}
77
+
78
+ CTEST (axpy ,zaxpy_incx_0 )
79
+ {
80
+ blasint i ;
81
+ blasint N = 4 ,incX = 0 ,incY = 1 ;
82
+ double a [2 ]= {0.25 ,0.5 };
83
+ double x1 []= {1.0 ,3.0 ,5.0 ,7.0 ,1.0 ,3.0 ,5.0 ,7.0 };
84
+ double y1 []= {2.0 ,4.0 ,6.0 ,8.0 ,2.0 ,4.0 ,6.0 ,8.0 };
85
+ double x2 []= {1.0 ,3.0 ,5.0 ,7.0 ,1.0 ,3.0 ,5.0 ,7.0 };
86
+ double y2 []= {0.75 ,5.25 ,4.75 ,9.25 ,0.75 ,5.25 ,4.75 ,9.25 };
87
+
88
+ //OpenBLAS
89
+ BLASFUNC (zaxpy )(& N ,a ,x1 ,& incX ,y1 ,& incY );
90
+
91
+ for (i = 0 ; i < 2 * N ; i ++ ){
92
+ ASSERT_DBL_NEAR_TOL (x2 [i ], x1 [i ], DOUBLE_EPS );
93
+ ASSERT_DBL_NEAR_TOL (y2 [i ], y1 [i ], DOUBLE_EPS );
94
+ }
95
+ }
96
+
77
97
#endif
78
98
79
99
#ifdef BUILD_SINGLE
@@ -116,5 +136,24 @@ CTEST(axpy,caxpy_inc_0)
116
136
ASSERT_DBL_NEAR_TOL (y2 [i ], y1 [i ], DOUBLE_EPS );
117
137
}
118
138
}
139
+
140
+ CTEST (axpy ,caxpy_incx_0 )
141
+ {
142
+ blasint i ;
143
+ blasint N = 4 ,incX = 0 ,incY = 1 ;
144
+ float a [2 ]= {0.25 ,0.5 };
145
+ float x1 []= {1.0 ,3.0 ,5.0 ,7.0 ,1.0 ,3.0 ,5.0 ,7.0 };
146
+ float y1 []= {2.0 ,4.0 ,6.0 ,8.0 ,2.0 ,4.0 ,6.0 ,8.0 };
147
+ double x2 []= {1.0 ,3.0 ,5.0 ,7.0 ,1.0 ,3.0 ,5.0 ,7.0 };
148
+ double y2 []= {0.75 ,5.25 ,4.75 ,9.25 ,0.75 ,5.25 ,4.75 ,9.25 };
149
+
150
+ //OpenBLAS
151
+ BLASFUNC (caxpy )(& N ,a ,x1 ,& incX ,y1 ,& incY );
152
+
153
+ for (i = 0 ; i < 2 * N ; i ++ ){
154
+ ASSERT_DBL_NEAR_TOL (x2 [i ], x1 [i ], DOUBLE_EPS );
155
+ ASSERT_DBL_NEAR_TOL (y2 [i ], y1 [i ], DOUBLE_EPS );
156
+ }
157
+ }
119
158
#endif
120
159
0 commit comments