From a6e16a065dd43dea6fd48fb3e2776e760a3d2471 Mon Sep 17 00:00:00 2001 From: Evgeni Burovski Date: Tue, 12 Mar 2024 15:15:56 +0300 Subject: [PATCH 1/2] Add a test for dnrm(..., incx=-1) --- utest/test_dnrm2.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/utest/test_dnrm2.c b/utest/test_dnrm2.c index 0035863df6..ab8cac33e0 100644 --- a/utest/test_dnrm2.c +++ b/utest/test_dnrm2.c @@ -30,7 +30,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. **********************************************************************************/ - +#include #include "openblas_utest.h" #if defined(BUILD_DOUBLE) @@ -64,4 +64,17 @@ CTEST(dnrm2,dnrm2_tiny) res1=BLASFUNC(dnrm2)(&n, x, &incx); ASSERT_DBL_NEAR_TOL(res2, res1, DOUBLE_EPS); } +CTEST(dnrm2,dnrm2_neg_incx) +{ + int i; + double x[5]; + blasint incx=-1; + blasint n=5; + double res1, res2; + + for (i=0;i Date: Tue, 12 Mar 2024 15:28:50 +0300 Subject: [PATCH 2/2] Update utest/test_dnrm2.c --- utest/test_dnrm2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utest/test_dnrm2.c b/utest/test_dnrm2.c index ab8cac33e0..1456760441 100644 --- a/utest/test_dnrm2.c +++ b/utest/test_dnrm2.c @@ -72,7 +72,7 @@ CTEST(dnrm2,dnrm2_neg_incx) blasint n=5; double res1, res2; - for (i=0;i