[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] About invalid parameters in cblas implementation
From: |
José Luis García Pallero |
Subject: |
Re: [Help-gsl] About invalid parameters in cblas implementation |
Date: |
Sun, 19 Jul 2009 23:43:45 +0200 |
El 19 de julio de 2009 23:01, Brian Gough <address@hidden> escribió:
> At Sat, 18 Jul 2009 13:30:54 +0200,
> José Luis García Pallero wrote:
> > But I don't understand clearly how these macros run. My idea is that the
> > macros "return" in the argument 'pos' the position in the argument list
> of
> > the bad argument and then we can do the correct thing:
> > - If we are working in cblas_* function, call cblas_xerbla
> > - If we are working with gsl_cblas_* wrapper, call a function to convert
> > from 'pos' to GSL_ERROR_CODE and return this code.
> > I don't know exactly the behaviour of your macros.
>
> We can reuse the higher level macros like CHECK_GEMV but we would
> need different implementations of the lower macros like CHECK_DIM.
>
> For example the cblas dimensions are 'int', and the gsl_blas
> dimensions are 'size_t' -- therefore the check for dim<0 would not
> work for size_t (we might instead want to make sure that dim is
> <=INT_MAX for size_t).
>
> #define CHECK_DIM(pos,dim) if ((dim)>=INT_MAX) { ERROR("dimension "
> #dim " exceeds maximum size", GSL_EBADLEN) ; }
>
> It's shouldn't be too much extra work to redo the lower macros for the
> two cases as there are a limited number of them.
>
I think that the low level macros can be the same. All arguments to check in
cblas_* are integer, therefore we can implement a general macro like
CHECK_LONGITUDE for checking the size of int arguments. This macro should be
called before high level macros (CHECK_GEMV, etc.).
--
*****************************************
José Luis García Pallero
address@hidden
(o<
/ / \
V_/_
Use Debian GNU/Linux and enjoy!
*****************************************
- Re: [Help-gsl] About invalid parameters in cblas implementation, José Luis García Pallero, 2009/07/01
- Re: [Help-gsl] About invalid parameters in cblas implementation, Brian Gough, 2009/07/02
- Re: [Help-gsl] About invalid parameters in cblas implementation, José Luis García Pallero, 2009/07/04
- Re: [Help-gsl] About invalid parameters in cblas implementation, Brian Gough, 2009/07/06
- Re: [Help-gsl] About invalid parameters in cblas implementation, José Luis García Pallero, 2009/07/07
- Re: [Help-gsl] About invalid parameters in cblas implementation, Brian Gough, 2009/07/09
- Re: [Help-gsl] About invalid parameters in cblas implementation, José Luis García Pallero, 2009/07/11
- Re: [Help-gsl] About invalid parameters in cblas implementation, Brian Gough, 2009/07/16
- Re: [Help-gsl] About invalid parameters in cblas implementation, José Luis García Pallero, 2009/07/18
- Re: [Help-gsl] About invalid parameters in cblas implementation, Brian Gough, 2009/07/19
- Re: [Help-gsl] About invalid parameters in cblas implementation,
José Luis García Pallero <=
- Re: [Help-gsl] About invalid parameters in cblas implementation, Brian Gough, 2009/07/22
- Re: [Help-gsl] About invalid parameters in cblas implementation, José Luis García Pallero, 2009/07/24