We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 42584b4 + 07dddde commit 161ac17Copy full SHA for 161ac17
1 file changed
utest/test_dnrm2.c
@@ -30,7 +30,7 @@ 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
-
+#include <math.h>
34
#include "openblas_utest.h"
35
#if defined(BUILD_DOUBLE)
36
@@ -64,4 +64,17 @@ CTEST(dnrm2,dnrm2_tiny)
64
res1=BLASFUNC(dnrm2)(&n, x, &incx);
65
ASSERT_DBL_NEAR_TOL(res2, res1, DOUBLE_EPS);
66
}
67
+CTEST(dnrm2,dnrm2_neg_incx)
68
+{
69
+ int i;
70
+ double x[5];
71
+ blasint incx=-1;
72
+ blasint n=5;
73
+ double res1, res2;
74
+
75
+ for (i=0;i<n;i++)x[i]=10.0;
76
+ res1=BLASFUNC(dnrm2)(&n, x, &incx);
77
+ res2 = sqrt(500.0);
78
+ ASSERT_DBL_NEAR_TOL(res2, res1, DOUBLE_EPS);
79
+}
80
#endif
0 commit comments