[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gsl] GSL 1.9 test_cblas vs Intel MKL
From: |
Albert Strasheim |
Subject: |
Re: [Bug-gsl] GSL 1.9 test_cblas vs Intel MKL |
Date: |
Thu, 26 Apr 2007 13:42:18 +0200 |
Hello all
----- Original Message -----
From: "Brian Gough" <address@hidden>
To: "Albert Strasheim" <address@hidden>
Cc: <address@hidden>
Sent: Thursday, April 26, 2007 11:00 AM
Subject: Re: [Bug-gsl] GSL 1.9 test_cblas vs Intel MKL
At Thu, 26 Apr 2007 00:44:06 +0200,
Albert Strasheim wrote:
GSL's sscal function does this as its first operation:
if (incX <= 0) { return; }
I might be mistaken, but I don't think other BLAS implementations have
this
restriction. Instead incX=-1 just means step backward in memory from
&X[0],
instead of forward.
Any thoughts?
Thanks for your email.
The original BLAS Level-1 paper says "Only positive values of INCX are
allowed for operations ..... that have a single vector argument". The
original Fortran reference BLAS returns zero in these cases, so we
followed that convention.
Ah, thanks for the reference.
It looks like there are some errors in the test suite that don't
follow this pattern, do you know what is the problem with those?
I think I've figured out how MKL calculates these values. Found this in the
MKL Quick Reference:
"""
Vector arguments are passed in one-dimensional arrays. The array dimension
(length) and vector increment are passed as integer variables. The length
determines the number of elements in the vector. The increment (also called
stride) determines the spacing between vector elements and the order of the
elements in the array in which the vector is passed.
A vector of length n and increment incx is passed in a one-dimensional array
x whose values are defined as:
x(1), x(1+|incx|), ..., x(1+(n-1)* |incx|)
If incx is positive, then the elements in array x are stored in increasing
order. If incx is negative, the elements in array x are stored in decreasing
order with the first element defined as x(1+(n-1)*|incx|). If incx is zero,
then all elements of the vector have the same value, x(1).
The dimension of the one-dimensional array that stores the vector must
always be at least idimx = 1+(n-1)* |incx| .
"""
The chance of this being the case is probably slight, but are there any
functions in GSL that depend on GSL's BLAS's behaviour for negative incX? I
guess I could set a few breakpoints or add printfs to see if negative incXs
get passed in when the unit tests are run.
Regards,
Albert