help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] About invalid parameters in cblas implementation [News fo


From: José Luis García Pallero
Subject: Re: [Help-gsl] About invalid parameters in cblas implementation [News for an old discussion]
Date: Mon, 16 Aug 2010 23:22:16 +0200

> Can you make a patch for the level-2 cblas functions only, I'm
> reasonably happy with those but not sure about the level-3.

Ok, but I think it will take a while. Now I don't have much time.

> I think it would be better to move the pos argument inside the macro, as it
> shouldn't be needed outside it (example below).

I prefer maintain the pos argument outside (I think this was
discussed). If pos is outside we could use the same macro in the cblas
functions and in the GSL wreppers of cblas to check the errors and
return a GSL error code. The "problem" with cblas is that an incorrect
input argument STOPS the execution of the program (in GSL this will
cause memory leaks, for example).

> #define CBLAS_ERROR_GEMV(order,TransA,M,N,alpha,A,lda,X,incX,beta,Y,incY) \
> { int pos = 0; \
> CHECK_ORDER(pos,1,order); \
> CHECK_TRANSPOSE(pos,2,TransA); \
> CHECK_DIM(pos,3,M); \
> CHECK_DIM(pos,4,N); \
> if((order)==CblasRowMajor) { \
>    if((lda)<CBLAS_MAX(1,N)) { \
>        pos = 7; \
>    } \
> } else if((order)==CblasColMajor) { \
>    if((lda)<CBLAS_MAX(1,M)) { \
>        pos = 7; \
>    } \
> } \
> CHECK_STRIDE(pos,9,incX); \
> CHECK_STRIDE(pos,12,incY); \
> REPORT_ERROR(pos) ; }
>



-- 
*****************************************
José Luis García Pallero
address@hidden
(o<
/ / \
V_/_
Use Debian GNU/Linux and enjoy!
*****************************************



reply via email to

[Prev in Thread] Current Thread [Next in Thread]