Commit c3778ef4 authored by Izzard, Robert Dr (Physics)'s avatar Izzard, Robert Dr (Physics)

Merge branch 'master' of gitlab.eps.surrey.ac.uk:ri0005/librinterpolate

parents 93e8233a ca1ccbc2
Version 1.3 Monday 01/04/2019
No April fool! I've rewritten the code to be more
table-based and less big, nasty array based. It needed this
work years ago, but now it's done. Testing on binary_c
is going well.
Version 1.2 Sunday 31/03/2019
......
......@@ -3,7 +3,7 @@
#include <malloc.h>
#endif
void rinterpolate_alloc_hypertable(struct rinterpolate_table_t * table)
void rinterpolate_alloc_hypertable(struct rinterpolate_table_t * RESTRICT table)
{
/* make space for hypertable */
table->hypertable = RINTERPOLATE_MALLOC(sizeof(struct rinterpolate_hypertable_t));
......
......@@ -20,7 +20,7 @@
(strcmp("" #macro, \
Stringify(macro)) ? "on" : "off" ));
void rinterpolate_build_flags(struct rinterpolate_data_t * rinterpolate_data)
void rinterpolate_build_flags(struct rinterpolate_data_t * RESTRICT rinterpolate_data)
{
Macrotest(RINTERPOLATE_USE_REALLOC);
Macrotest(RINTERPOLATE_USE_POINTER_ARITHMETIC);
......
......@@ -17,7 +17,7 @@ struct rinterpolate_data_t * rinterpolate(
void rinterpolate_free_data(struct rinterpolate_data_t * RESTRICT rinterpolate_data);
rinterpolate_counter_t rinterpolate_alloc_dataspace(struct rinterpolate_data_t ** RESTRICT r);
void rinterpolate_build_flags(struct rinterpolate_data_t * rinterpolate_data);
void rinterpolate_build_flags(struct rinterpolate_data_t * RESTRICT rinterpolate_data);
#ifdef __RINTERPOLATE__
/*
......@@ -43,7 +43,7 @@ rinterpolate_Boolean_t rinterpolate_check_cache(
void rinterpolate_alloc_cacheline(struct rinterpolate_table_t * RESTRICT table);
#endif
void rinterpolate_make_steps(struct rinterpolate_table_t * RESTRICT table);
void rinterpolate_alloc_hypertable(struct rinterpolate_table_t * table);
void rinterpolate_alloc_hypertable(struct rinterpolate_table_t * RESTRICT table);
void rinterpolate_alloc_varcount(struct rinterpolate_table_t * RESTRICT table);
void rinterpolate_search_table(
struct rinterpolate_table_t * RESTRICT table,
......@@ -58,9 +58,9 @@ void rinterpolate_interpolate(
const rinterpolate_float_t * RESTRICT x,
rinterpolate_float_t * RESTRICT r);
void rinterpolate_store_cache(struct rinterpolate_table_t * table,
const rinterpolate_float_t * x,
const rinterpolate_float_t * r);
void rinterpolate_store_cache(struct rinterpolate_table_t * RESTRICT table,
const rinterpolate_float_t * RESTRICT x,
const rinterpolate_float_t * RESTRICT r);
void rinterpolate_make_presearch(struct rinterpolate_table_t * RESTRICT table);
......
#include "rinterpolate.h"
#ifdef RINTERPOLATE_CACHE
void rinterpolate_store_cache(struct rinterpolate_table_t * table,
const rinterpolate_float_t * x,
const rinterpolate_float_t * r
void rinterpolate_store_cache(struct rinterpolate_table_t * RESTRICT table,
const rinterpolate_float_t * RESTRICT x,
const rinterpolate_float_t * RESTRICT r
)
{
/* use the next line of the cache */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment