[Top][All Lists]

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

Re: [Bug-gsl] gsl version 1.5 - A few small source code issues

From: Brian Gough
Subject: Re: [Bug-gsl] gsl version 1.5 - A few small source code issues
Date: Fri, 6 Aug 2004 12:18:29 +0100

Peter Rockett writes:
 > A couple of small things in the source code of version 1.5:
 > 2)The functions in the /util sub-directory seem to implement things like
 > memcpy() if you don't have a system-defined version of memcpy(), etc....

The utils directory is old and taken from a standard gnu template.  If
it is not causing a problem I would prefer to leave it alone, but if
you have a specific error I will fix it.

 > Incidentally, shouldn't functions like gsl_vector_memcpy and
 > gsl_matrix_memcpy use the memcpy function for efficiency rather than
 > nested for-loops? If the compiler doesn't have memcpy then the version
 > in /utils would be called instead. Should the /util functions be
 > inlines, again for efficiency?

The memory layout is not contiguous (stride, tda) so memcpy can only
be used in special cases (stride=1, tda=size2).  Optimised for loops
perform reasonable well in my experience, but if you have a benchmark
that shows differently I would be interested to look at it.

Brian Gough

reply via email to

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