This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]