This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: forwarded message from Francisco J Molina
- From: "Peter S. Christopher" <peterc at midway dot uchicago dot edu>
- To: Francisco J Molina <fjmolina at lbl dot gov>
- Cc: gsl-discuss at sources dot redhat dot com
- Date: Fri, 1 Aug 2003 16:41:24 -0500 (CDT)
- Subject: Re: forwarded message from Francisco J Molina
Hi there,
If you compile the library with GSL_RANGE_CHECK_OFF than the lib
won't do any range checking, and the call should be inlined. FYI, the
definition of gsl_vector_get is found in gsl_vector_double.h and looks
like this
extern inline
double
gsl_vector_get (const gsl_vector * v, const size_t i)
{
#ifndef GSL_RANGE_CHECK_OFF
if (i >= v->size)
{
GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0);
}
#endif
return v->data[i * v->stride];
}
so, if you're so inclined, you can simply use v->data[i * v->stride] on
your vector v.
-Pete
On Fri, 1 Aug 2003, Francisco J Molina wrote:
[NON-Text Body part not included]