19 double *** src_fields,
double *** src_frac_masks,
double ** tgt_field,
20 double frac_mask_fallback_value,
double scale_factor,
double scale_summand);
23 double *** src_fields,
double *** src_frac_masks,
24 int is_target,
double frac_mask_fallback_value,
25 double scale_factor,
double scale_summand);
28 double frac_mask_fallback_value,
double scale_factor,
double scale_summand);
31 double frac_mask_fallback_value,
double scale_factor,
double scale_summand);
90 size_t collection_size, Xt_redist redist_) {
96 &redist_, 1, collection_size, 0,
"source to target"),
121 double *** src_fields,
double *** src_frac_masks,
double ** tgt_field,
122 double frac_mask_fallback_value,
double scale_factor,
double scale_summand) {
127 double ** src_send_buffer = NULL;
130 direct->
src2tgt,
"yac_interpolation_direct_execute");
135 (scale_factor != 1.0) || (scale_summand != 0.0)) {
140 (
double const * restrict **)src_fields,
141 (
double const * restrict **)src_frac_masks, src_send_buffer,
144 scale_factor, scale_summand);
150 src_send_buffer[i] = src_fields[i][0];
155 direct->
src2tgt, (
double const **)src_send_buffer, tgt_field,
156 "yac_interpolation_direct_execute");
161 double *** src_fields,
double *** src_frac_masks,
int is_target,
162 double frac_mask_fallback_value,
double scale_factor,
double scale_summand) {
169 double ** src_send_buffer = NULL;
175 direct->
src2tgt,
"yac_interpolation_direct_execute_put") ==
178 direct->
src2tgt,
"yac_interpolation_direct_execute_put");
183 (
double const * restrict **)src_fields,
184 (
double const * restrict **)src_frac_masks, src_send_buffer,
187 scale_factor, scale_summand);
191 direct->
src2tgt, (
double const **)src_send_buffer,
192 "yac_interpolation_direct_execute_put");
197 double frac_mask_fallback_value,
double scale_factor,
double scale_summand) {
199 UNUSED(frac_mask_fallback_value);
207 direct->
src2tgt, tgt_field,
"yac_interpolation_direct_execute_get");
212 double frac_mask_fallback_value,
double scale_factor,
double scale_summand) {
214 UNUSED(frac_mask_fallback_value);
223 direct->
src2tgt,
"yac_interpolation_direct_execute_get_async") ==
226 direct->
src2tgt,
"yac_interpolation_direct_execute_get_async");
229 direct->
src2tgt, tgt_field,
"yac_interpolation_direct_execute_get_async");
254 direct->
src2tgt,
"yac_interpolation_direct_execute_put_test");
265 direct->
src2tgt,
"yac_interpolation_direct_execute_get_test");
275 direct->
src2tgt,
"yac_interpolation_direct_execute_wait");
281 if (interp == NULL)
return;
287 direct->
src2tgt,
"yac_interpolation_direct_delete");
#define YAC_FRAC_MASK_VALUE_IS_VALID(value)
static int yac_interpolation_direct_is_source(struct yac_interpolation_type *interp)
static void yac_interpolation_direct_execute_wait(struct yac_interpolation_type *interp)
struct yac_interpolation_type * yac_interpolation_direct_new(size_t collection_size, Xt_redist redist_)
static int yac_interpolation_direct_execute_put_test(struct yac_interpolation_type *interp)
static int yac_interpolation_direct_execute_get_test(struct yac_interpolation_type *interp)
static void yac_interpolation_direct_execute(struct yac_interpolation_type *interp, double ***src_fields, double ***src_frac_masks, double **tgt_field, double frac_mask_fallback_value, double scale_factor, double scale_summand)
static struct yac_interpolation_type * yac_interpolation_direct_new_(size_t collection_size, struct yac_interpolation_exchange *src2tgt, struct yac_interpolation_buffer src_data)
static struct yac_interpolation_type * yac_interpolation_direct_copy(struct yac_interpolation_type *interp)
static void yac_interpolation_direct_delete(struct yac_interpolation_type *interp)
static int yac_interpolation_direct_is_target(struct yac_interpolation_type *interp)
static struct yac_interpolation_type_vtable const interpolation_direct_vtable
static void yac_interpolation_direct_execute_get_async(struct yac_interpolation_type *interp, double **tgt_field, double frac_mask_fallback_value, double scale_factor, double scale_summand)
static void yac_interpolation_direct_execute_put(struct yac_interpolation_type *interp, double ***src_fields, double ***src_frac_masks, int is_target, double frac_mask_fallback_value, double scale_factor, double scale_summand)
static void yac_interpolation_direct_execute_get(struct yac_interpolation_type *interp, double **tgt_field, double frac_mask_fallback_value, double scale_factor, double scale_summand)
int yac_interpolation_exchange_put_test(struct yac_interpolation_exchange *exchange, char const *routine_name)
int yac_interpolation_exchange_is_target(struct yac_interpolation_exchange *exchange)
void yac_interpolation_exchange_execute_get_async(struct yac_interpolation_exchange *exchange, double **recv_data, char const *routine_name)
struct yac_interpolation_exchange * yac_interpolation_exchange_copy(struct yac_interpolation_exchange *exchange)
void yac_interpolation_exchange_delete(struct yac_interpolation_exchange *exchange, char const *routine_name)
void yac_interpolation_exchange_execute_get(struct yac_interpolation_exchange *exchange, double **recv_data, char const *routine_name)
void yac_interpolation_exchange_wait(struct yac_interpolation_exchange *exchange, char const *routine_name)
void yac_interpolation_exchange_execute_put(struct yac_interpolation_exchange *exchange, double const **send_data, char const *routine_name)
struct yac_interpolation_exchange * yac_interpolation_exchange_new(Xt_redist *redists, size_t num_fields, size_t collection_size, int with_frac_mask, char const *name)
void yac_interpolation_exchange_execute(struct yac_interpolation_exchange *exchange, double const **send_data_, double **recv_data_, char const *routine_name)
enum YAC_INTERP_EXCH_STATUS yac_interpolation_exchange_status(struct yac_interpolation_exchange *exchange, char const *routine_name)
int yac_interpolation_exchange_get_test(struct yac_interpolation_exchange *exchange, char const *routine_name)
int yac_interpolation_exchange_is_source(struct yac_interpolation_exchange *exchange)
struct yac_interpolation_buffer yac_interpolation_buffer_copy(struct yac_interpolation_buffer src, size_t num_fields, size_t collection_size)
void yac_interpolation_buffer_free(struct yac_interpolation_buffer *buffer)
struct yac_interpolation_buffer yac_interpolation_buffer_init(Xt_redist *redists, size_t num_fields, size_t collection_size, enum yac_interpolation_buffer_type type)
static void compute_tgt_field(double const *restrict **src_fields, double const *restrict **src_frac_masks, double *restrict *tgt_field, size_t *restrict tgt_buffer_sizes, size_t num_src_fields, size_t collection_size, double frac_mask_fallback_value, double scale_factor, double scale_summand)
#define xcalloc(nmemb, size)
struct yac_interpolation_buffer src_data
struct yac_interpolation_exchange * src2tgt
struct yac_interpolation_type_vtable const * vtable
double ** src_field_buffer
int(* is_source)(struct yac_interpolation_type *interp)