At Fri, 1 May 2009 09:46:51 +0200, Marco Maggi wrote: > so when the vector stride is negative the elements > of the vector are iterated starting from index: > > i = (X->size - 1) * -(X->stride); > > which equals: > > i = (X->size - 1) * abs(X->stride);
Hello, According the the original BLAS standards, a negative stride (inc) accesses the elements backwards, i.e. incX=-1 accesses the vector as X->data[(N-1)], X->data[(N-2)], ...., X->data[0]. and incX=-2 as X->data[2*(N-1)], X->data[2*(N-2)], ...., X->data[0]. Positive and negative inc values can be used together, the result is of the form \sigma_i x_i y_(N-i) in a dot product for example. Only the cblas functions support -ve stride, the gsl_vectors always have +ve strides so this doesn't affect anything involving gsl_vector. > Notice that the test suite in "cblas/test_rotm.c" > tests vectors of size==1, so this problem does not > show itself. Hmm, yes, it would be good to extend that. -- Brian Gough _______________________________________________ Help-gsl mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gsl
