YAC 3.12.0
Yet Another Coupler
Loading...
Searching...
No Matches
interp_operator.c File Reference
Include dependency graph for interp_operator.c:

Go to the source code of this file.

Functions

int yac_interp_operator_is_source (struct yac_interp_operator *interp)
 Checks if the current process holds source data for the interpolation operator.
 
int yac_interp_operator_is_target (struct yac_interp_operator *interp)
 Checks if the current process holds target data for the interpolation operator.
 
void yac_interp_operator_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)
 
void yac_interp_operator_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)
 
void yac_interp_operator_execute_get (struct yac_interp_operator *interp, double **tgt_field, double frac_mask_fallback_value, double scale_factor, double scale_summand)
 
void yac_interp_operator_execute_get_async (struct yac_interp_operator *interp, double **tgt_field, double frac_mask_fallback_value, double scale_factor, double scale_summand)
 
enum YAC_INTERP_TEST_STATUS yac_interp_operator_execute_put_test (struct yac_interp_operator *interp)
 Test whether the put phase has completed.
 
enum YAC_INTERP_TEST_STATUS yac_interp_operator_execute_get_test (struct yac_interp_operator *interp)
 Test whether the get phase has completed.
 
void yac_interp_operator_execute_wait (struct yac_interp_operator *interp)
 Wait for all pending put/get operations to finish.
 
struct yac_interp_operatoryac_interp_operator_copy (struct yac_interp_operator *interp)
 Create a deep copy of the interpolation operator.
 
void yac_interp_operator_delete (struct yac_interp_operator *interp)
 Delete the interpolation operator and free resources.
 

Function Documentation

◆ yac_interp_operator_copy()

struct yac_interp_operator * yac_interp_operator_copy ( struct yac_interp_operator * interp)

Create a deep copy of the interpolation operator.

This function produces a new interpolation object with the same internal state as interp. The returned object can be modified or executed independently.

Parameters
[in]interpInterpolation object to copy.
Returns
Newly allocated deep copy of the interpolation object.

Definition at line 67 of file interp_operator.c.

Here is the caller graph for this function:

◆ yac_interp_operator_delete()

void yac_interp_operator_delete ( struct yac_interp_operator * interp)

Delete the interpolation operator and free resources.

This function releases all memory and handles associated with the interpolation object. After calling this function, the object must no longer be used.

Parameters
[in]interpInterpolation object to delete.

Definition at line 72 of file interp_operator.c.

Here is the caller graph for this function:

◆ yac_interp_operator_execute()

void yac_interp_operator_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 )

Execute interpolation synchronously and write results to target fields.

Parameters
[in,out]interpInterpolation object.
[in]src_fieldsSource field data.
dimensions: [collection_idx][field_idx][local_idx]
[in]src_frac_masksFractional mask data.
dimensions: [collection_idx][field_idx][local_idx]
[in,out]tgt_fieldTarget field data.
dimensions: [collection_idx][local_idx]
[in]frac_mask_fallback_valueValue for targets for which the sum of fractional mask value of associated source points is zero.
[in]scale_factorScaling factor for interpolated targets.
[in]scale_summandSummand added to interpolated targets.

Definition at line 15 of file interp_operator.c.

Here is the caller graph for this function:

◆ yac_interp_operator_execute_get()

void yac_interp_operator_execute_get ( struct yac_interp_operator * interp,
double ** tgt_field,
double frac_mask_fallback_value,
double scale_factor,
double scale_summand )

Complete the get phase synchronously and write results to target fields.

Parameters
[in,out]interpInterpolation object.
[out]tgt_fieldTarget field data.
dimensions: [collection_idx][local_idx]
[in]frac_mask_fallback_valueFallback value for fractional masks.
[in]scale_factorScaling factor for interpolated targets.
[in]scale_summandSummand added to interpolated targets.

Definition at line 35 of file interp_operator.c.

Here is the caller graph for this function:

◆ yac_interp_operator_execute_get_async()

void yac_interp_operator_execute_get_async ( struct yac_interp_operator * interp,
double ** tgt_field,
double frac_mask_fallback_value,
double scale_factor,
double scale_summand )

Execute get phase asynchronously.

Parameters
[in,out]interpInterpolation object.
[out]tgt_fieldTarget field data.
dimensions: [collection_idx][local_idx]
[in]frac_mask_fallback_valueFallback value for fractional masks.
[in]scale_factorScaling factor for interpolated targets.
[in]scale_summandSummand added to interpolated targets.

Definition at line 44 of file interp_operator.c.

Here is the caller graph for this function:

◆ yac_interp_operator_execute_get_test()

enum YAC_INTERP_TEST_STATUS yac_interp_operator_execute_get_test ( struct yac_interp_operator * interp)

Test whether the get phase has completed.

This function returns the current status of the asynchronous get phase. It does not block; the caller can use it to poll completion before calling execute_wait or accessing the target data.

Parameters
[in]interpInterpolation object.
Returns
YAC_INTERP_COMPLETE if no open get operation is in progress, YAC_INTERP_INCOMPLETE otherwise.

Definition at line 58 of file interp_operator.c.

Here is the caller graph for this function:

◆ yac_interp_operator_execute_put()

void yac_interp_operator_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 )

Execute the put phase asynchronously.

Parameters
[in,out]interpInterpolation object.
[in]src_fieldsSource field data.
dimensions: [collection_idx][field_idx][local_idx].
[in]src_frac_masksFractional mask data.
dimensions: [collection_idx][field_idx][local_idx].
[in]is_targetNonzero if process holds target data.
[in]frac_mask_fallback_valueFallback value for fractional masks.
[in]scale_factorScaling factor for interpolated targets.
[in]scale_summandSummand added to interpolated targets.

Definition at line 25 of file interp_operator.c.

Here is the caller graph for this function:

◆ yac_interp_operator_execute_put_test()

enum YAC_INTERP_TEST_STATUS yac_interp_operator_execute_put_test ( struct yac_interp_operator * interp)

Test whether the put phase has completed.

This function returns the current status of the asynchronous put phase. It does not block; the caller can use it to poll completion before calling execute_get or execute_wait.

Parameters
[in]interpInterpolation object.
Returns
YAC_INTERP_COMPLETE if no open put operation is in progress, YAC_INTERP_INCOMPLETE otherwise.

Definition at line 53 of file interp_operator.c.

Here is the caller graph for this function:

◆ yac_interp_operator_execute_wait()

void yac_interp_operator_execute_wait ( struct yac_interp_operator * interp)

Wait for all pending put/get operations to finish.

This function blocks until any outstanding asynchronous put and get phases associated with the interpolation object have completed. It ensures the target fields are safe to access.

Parameters
[in]interpInterpolation object.

Definition at line 63 of file interp_operator.c.

Here is the caller graph for this function:

◆ yac_interp_operator_is_source()

int yac_interp_operator_is_source ( struct yac_interp_operator * interp)

Checks if the current process holds source data for the interpolation operator.

This function determines whether the calling process is responsible for providing source data in the context of the given interpolation operator.

Parameters
interpPointer to the interpolation operator structure.
Returns
Nonzero if the current process holds source data, zero otherwise.

Definition at line 7 of file interp_operator.c.

Here is the caller graph for this function:

◆ yac_interp_operator_is_target()

int yac_interp_operator_is_target ( struct yac_interp_operator * interp)

Checks if the current process holds target data for the interpolation operator.

This function determines whether the calling process is responsible for receiving or processing target data in the context of the given interpolation operator.

Parameters
interpPointer to the interpolation operator structure.
Returns
Nonzero if the current process holds target data, zero otherwise.

Definition at line 11 of file interp_operator.c.

Here is the caller graph for this function: