[clblas] 82/125: Add an comment to explain the nrm2 workaround on OSX

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Fri May 29 06:57:24 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository clblas.

commit c87d8c6fcf774fbd7c514b4340bb40c317837493
Author: Christian Kellner <christian at kellner.me>
Date:   Tue Jun 17 17:22:31 2014 +0200

    Add an comment to explain the nrm2 workaround on OSX
---
 src/tests/correctness/blas-lapack.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/tests/correctness/blas-lapack.c b/src/tests/correctness/blas-lapack.c
index 1f58272..9687bdf 100644
--- a/src/tests/correctness/blas-lapack.c
+++ b/src/tests/correctness/blas-lapack.c
@@ -849,6 +849,8 @@ int izamax( int n, doublecomplex *x, int incx)
 float snrm2( int n, float *x, int incx)
 {
 #ifdef __APPLE__
+    //On OSX passing negative values for incx can lead to a
+    //a crash, so we catch it here (cf. Github issue #37).
     if (n < 1 || incx < 1) {
         return 0;
     }
@@ -861,6 +863,8 @@ float snrm2( int n, float *x, int incx)
 double dnrm2( int n, double *x, int incx)
 {
 #ifdef __APPLE__
+    //On OSX passing negative values for incx can lead to a
+    //a crash, so we catch it here (cf. Github issue #37).
     if (n < 1 || incx < 1) {
         return 0;
     }
@@ -873,6 +877,8 @@ double dnrm2( int n, double *x, int incx)
 float scnrm2( int n, complex *x, int incx)
 {
 #ifdef __APPLE__
+    //On OSX passing negative values for incx can lead to a
+    //a crash, so we catch it here (cf. Github issue #37).
     if (n < 1 || incx < 1) {
         return 0;
     }
@@ -885,6 +891,8 @@ float scnrm2( int n, complex *x, int incx)
 double dznrm2( int n, doublecomplex *x, int incx)
 {
 #ifdef __APPLE__
+    //On OSX passing negative values for incx can lead to a
+    //a crash, so we catch it here (cf. Github issue #37).
     if (n < 1 || incx < 1) {
         return 0;
     }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/clblas.git



More information about the debian-science-commits mailing list