|
YAC 3.12.0
Yet Another Coupler
|
#include <string.h>#include "interpolation/operators/interp_operator_sum_mvp_at_tgt.h"#include "utils_core.h"#include "yaxt.h"#include "interpolation/interpolation_utils.h"#include "interpolation/interpolation_exchange.h"#include "collection_selection_internal.h"#include "interpolation/operators/interp_operator_internal.h"
Go to the source code of this file.
Data Structures | |
| struct | yac_interp_operator_sum_mvp_at_tgt |
Functions | |
| static int | yac_interp_operator_sum_mvp_at_tgt_is_source (struct yac_interp_operator *interp) |
| static int | yac_interp_operator_sum_mvp_at_tgt_is_target (struct yac_interp_operator *interp) |
| static void | yac_interp_operator_sum_mvp_at_tgt_execute (struct yac_interp_operator *interp, double ***src_fields, double ***src_frac_masks, double **tgt_field, double frac_mask_fallback_value, double scale_factor, double scale_summand) |
| static void | yac_interp_operator_sum_mvp_at_tgt_execute_put (struct yac_interp_operator *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_interp_operator_sum_mvp_at_tgt_execute_get (struct yac_interp_operator *interp, double **tgt_field, double frac_mask_fallback_value, double scale_factor, double scale_summand) |
| static void | yac_interp_operator_sum_mvp_at_tgt_execute_get_async (struct yac_interp_operator *interp, double **tgt_field, double frac_mask_fallback_value, double scale_factor, double scale_summand) |
| static enum YAC_INTERP_TEST_STATUS | yac_interp_operator_sum_mvp_at_tgt_execute_put_test (struct yac_interp_operator *interp) |
| static enum YAC_INTERP_TEST_STATUS | yac_interp_operator_sum_mvp_at_tgt_execute_get_test (struct yac_interp_operator *interp) |
| static void | yac_interp_operator_sum_mvp_at_tgt_execute_wait (struct yac_interp_operator *interp) |
| static struct yac_interp_operator * | yac_interp_operator_sum_mvp_at_tgt_copy (struct yac_interp_operator *interp) |
| static void | yac_interp_operator_sum_mvp_at_tgt_delete (struct yac_interp_operator *interp) |
| static int | local_src_data_is_used (size_t count, size_t const *src_field_idx) |
| static struct yac_interp_operator * | yac_interp_operator_sum_mvp_at_tgt_new_ (struct yac_collection_selection const *collection_selection, struct yac_interpolation_buffer src_send_data, struct yac_interpolation_buffer src_recv_data, struct yac_interpolation_exchange *src2tgt, size_t *tgt_pos, size_t tgt_count, size_t *prefix_num_src_per_tgt, double *weights, size_t *src_field_idx, size_t *src_idx, size_t num_src_fields, int with_frac_mask, int *ref_count) |
| Internal constructor for the "sum_mvp_at_tgt" interpolation operator. | |
| struct yac_interp_operator * | yac_interp_operator_sum_mvp_at_tgt_new (struct yac_collection_selection const *collection_selection, Xt_redist *src_redists, size_t *tgt_pos, size_t tgt_count, size_t *num_src_per_tgt, double *weights, size_t *src_field_idx, size_t *src_idx, size_t num_src_fields, int with_frac_mask) |
| Create a sum (weighted or unweighted) interpolation operator computed on the target processes. | |
| static void | compute_tgt (struct yac_interp_operator_sum_mvp_at_tgt *sum_mvp_at_tgt) |
Variables | |
| static struct yac_interp_operator_vtable const | interpolation_sum_mvp_at_tgt_vtable |
|
static |
Definition at line 563 of file interp_operator_sum_mvp_at_tgt.c.


|
static |
Definition at line 134 of file interp_operator_sum_mvp_at_tgt.c.

|
static |
Definition at line 710 of file interp_operator_sum_mvp_at_tgt.c.

|
static |
Definition at line 737 of file interp_operator_sum_mvp_at_tgt.c.

|
static |
Definition at line 393 of file interp_operator_sum_mvp_at_tgt.c.

|
static |
Definition at line 599 of file interp_operator_sum_mvp_at_tgt.c.

|
static |
Definition at line 626 of file interp_operator_sum_mvp_at_tgt.c.

|
static |
Definition at line 676 of file interp_operator_sum_mvp_at_tgt.c.


|
static |
Definition at line 487 of file interp_operator_sum_mvp_at_tgt.c.

|
static |
Definition at line 652 of file interp_operator_sum_mvp_at_tgt.c.

|
static |
Definition at line 696 of file interp_operator_sum_mvp_at_tgt.c.


|
static |
Definition at line 375 of file interp_operator_sum_mvp_at_tgt.c.
|
static |
Definition at line 384 of file interp_operator_sum_mvp_at_tgt.c.
|
static |
Internal constructor for the "sum_mvp_at_tgt" interpolation operator.
This function creates a target-side accumulation (sum) interpolation operator, where all source contributions are first redistributed to the target ranks using the provided exchange mapping (src2tgt). The actual weighted or unweighted summation is then performed locally on the target processes.
Unlike the public constructor yac_interp_operator_sum_mvp_at_tgt_new(), this routine takes already prepared internal data structures, such as the pre-initialized send and receive interpolation buffers. It is used by the public constructor and yac_interp_operator_sum_mvp_at_tgt_copy().
The resulting operator computes, for each target point t, the following:
where:
SIZE_MAX to indicate a contribution from a remote process),If fractional masks are enabled (with_frac_mask != 0), each source value is multiplied by its corresponding mask before accumulation. The mask values are also used to determine the effective weighting of each contribution. If the sum of all fractional mask values for source contribution for a target point is zero, the provided fallback value (see frac_mask_fallback_value in the execution call) is used instead.
| [in] | collection_selection | Selection of field collections to which this operator applies. |
| [in] | src_send_data | Buffer used to store the source data for the src2tgt exchange in the asynchronous put operation. |
| [in] | src_recv_data | Buffer used to receive the source data from the src2tgt exchange in the asynchronous put operation. |
| [in] | src2tgt | Exchange structure that describes the redistribution of source data required by processes for the interpolation of their local target points. |
| [in] | tgt_pos | Array of local target indices (length = tgt_count). Defines which target points are to be interpolated. |
| [in] | tgt_count | Number of target points to be computed by this interpolation operation. |
| [in] | prefix_num_src_per_tgt | Prefix-sum array of length tgt_count + 1. Defines the cumulative number of source contributions per target point. The number of source entries for target i is given by: |
| [in] | weights | Interpolation weights for all source contributions (length = prefix_num_src_per_tgt[tgt_count]). If NULL, an unweighted sum is performed. |
| [in] | src_field_idx | Array mapping each source contribution to a source field index (same length as weights). The special value SIZE_MAX denotes a contribution from a remote field (not owned by the local process). |
| [in] | src_idx | Array of source indices for each source contribution (same length as weights). Defines the position within the local source field data or receive buffer (depending on src_field_idx). |
| [in] | num_src_fields | Number of fields the source data consists of. |
| [in] | with_frac_mask | Non-zero value enables fractional mask support. In this case, both source values and masks are redistributed. |
| [in,out] | ref_count | Optional external reference counter. If non-NULL, it is incremented and stored. Upon deletion it is decremented. This allows the sharing of multiple data arrays between copies of the same interpolation operation. |
src_field_idx, array length consistency, and matching redistribution dimensions.prefix_num_src_per_tgt) must satisfy prefix_num_src_per_tgt[0] == 0 and be monotonically increasing.src2tgt, src_send_data, src_recv_data) must be fully initialized prior to calling this constructor.Definition at line 249 of file interp_operator_sum_mvp_at_tgt.c.


|
static |
Definition at line 47 of file interp_operator_sum_mvp_at_tgt.c.