YAC 3.13.0
Yet Another Coupler
Loading...
Searching...
No Matches
interpolation_exchange.h
Go to the documentation of this file.
1// Copyright (c) 2024 The YAC Authors
2//
3// SPDX-License-Identifier: BSD-3-Clause
4
18#ifndef INTERPOLATION_EXCHANGE_H
19#define INTERPOLATION_EXCHANGE_H
20
21#include <yaxt.h>
22
30
36
38
39
53 Xt_redist * redists, size_t num_fields, size_t collection_size,
54 int with_frac_mask, char const * name);
55
63 struct yac_interpolation_exchange * exchange);
64
65
72 struct yac_interpolation_exchange * exchange);
73
81 struct yac_interpolation_exchange * exchange);
82
90 struct yac_interpolation_exchange * exchange);
91
101 struct yac_interpolation_exchange * exchange,
102 double const ** send_data, double ** recv_data, char const * routine_name);
103
112 struct yac_interpolation_exchange * exchange, double const ** send_data,
113 char const * routine_name);
114
115
123 struct yac_interpolation_exchange * exchange, char const * routine_name);
124
134 struct yac_interpolation_exchange * exchange, char const * routine_name);
135
145 struct yac_interpolation_exchange * exchange, char const * routine_name);
146
147/*
148 * @brief Query the current status of the exchange.
149 *
150 * @param[in] exchange Exchange object.
151 * @param[in] routine_name Name of the calling routine (for logging).
152 * @return Current status as ::YAC_INTERP_EXCH_STATUS.
153 */
155 struct yac_interpolation_exchange * exchange, char const * routine_name);
156
165 struct yac_interpolation_exchange * exchange, double ** recv_data,
166 char const * routine_name);
167
176 struct yac_interpolation_exchange * exchange, double ** recv_data,
177 char const * routine_name);
178
186 struct yac_interpolation_exchange * exchange);
187
195 struct yac_interpolation_exchange * exchange, char const * routine_name);
196
197#endif // INTERPOLATION_EXCHANGE_H
unsigned num_fields
int yac_interpolation_exchange_is_target(struct yac_interpolation_exchange *exchange)
Query whether the current process participates as target.
void yac_interpolation_exchange_execute_get_async(struct yac_interpolation_exchange *exchange, double **recv_data, char const *routine_name)
Execute the get phase asynchronously.
void yac_interpolation_exchange_inc_ref_count(struct yac_interpolation_exchange *exchange)
Increase the reference count of an exchange object.
enum YAC_INTERP_EXCH_TEST_STATUS yac_interpolation_exchange_put_test(struct yac_interpolation_exchange *exchange, char const *routine_name)
Test whether the put phase has completed.
struct yac_interpolation_exchange * yac_interpolation_exchange_copy(struct yac_interpolation_exchange *exchange)
Create a deep copy of an interpolation exchange.
void yac_interpolation_exchange_delete(struct yac_interpolation_exchange *exchange, char const *routine_name)
Delete an interpolation exchange and release resources.
void yac_interpolation_exchange_execute_get(struct yac_interpolation_exchange *exchange, double **recv_data, char const *routine_name)
Execute the get phase and receive target data synchronously.
void yac_interpolation_exchange_wait(struct yac_interpolation_exchange *exchange, char const *routine_name)
Wait for completion of pending put/get phases.
enum YAC_INTERP_EXCH_TEST_STATUS yac_interpolation_exchange_get_test(struct yac_interpolation_exchange *exchange, char const *routine_name)
Test whether the get phase has completed.
YAC_INTERP_EXCH_TEST_STATUS
Status returned by test routines.
@ YAC_INTERP_EXCH_INCOMPLETE
Operation still in progress.
@ YAC_INTERP_EXCH_COMPLETE
No ongoing operation.
void yac_interpolation_exchange_execute_put(struct yac_interpolation_exchange *exchange, double const **send_data, char const *routine_name)
Execute only the put phase asynchronously.
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)
Create a new interpolation exchange object.
int yac_interpolation_exchange_with_frac_mask(struct yac_interpolation_exchange *exchange)
Query whether the exchange has fractional mask support.
void yac_interpolation_exchange_execute(struct yac_interpolation_exchange *exchange, double const **send_data, double **recv_data, char const *routine_name)
Execute the full exchange (put + get) synchronously.
enum YAC_INTERP_EXCH_STATUS yac_interpolation_exchange_status(struct yac_interpolation_exchange *exchange, char const *routine_name)
YAC_INTERP_EXCH_STATUS
Status of an interpolation exchange.
@ YAC_INTERP_EXCH_ACTIVE
Exchange is active.
@ YAC_INTERP_EXCH_WAIT_PUT
Waiting for put phase completion.
@ YAC_INTERP_EXCH_WAIT_GET
Waiting for get phase completion.
@ YAC_INTERP_EXCH_IDLE
No ongoing exchange.
int yac_interpolation_exchange_is_source(struct yac_interpolation_exchange *exchange)
Query whether the current process participates as source.
int collection_size
char const * name
Definition toy_scrip.c:114