The accelerator works by doing a binary search on the x array, and then caches the index for future lookups. So you can indeed use it for multiple data sets if they share a common x axis.
Patrick On 1/28/21 9:54 AM, Vishnu V. Krishnan wrote: > Hi! > > I have a question about allocating accelerators for interpolation look-ups. > > If I have multiple data-sets for which I need interpolating functions, do I > allocate separate accelerators for each of them? Or can all the data sets > that > share the same x-axes, share accelerators? > > If it is the latter case, it would be nice if this were made clearer in the > documentation: https://www.gnu.org/software/gsl/doc/html/interp.html > > Thanks a lot! > Vishnu >