YAC 3.21.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
21typedef struct Xt_redist_ *Xt_redist;
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
82 struct yac_interpolation_exchange * exchange);
83
92 struct yac_interpolation_exchange * exchange);
93
103 struct yac_interpolation_exchange * exchange,
104 double const ** send_data, double ** recv_data, char const * routine_name);
105
114 struct yac_interpolation_exchange * exchange, double const ** send_data,
115 char const * routine_name);
116
117
125 struct yac_interpolation_exchange * exchange, char const * routine_name);
126
136 struct yac_interpolation_exchange * exchange, char const * routine_name);
137
147 struct yac_interpolation_exchange * exchange, char const * routine_name);
148
149/*
150 * @brief Query the current status of the exchange.
151 *
152 * @param[in] exchange Exchange object.
153 * @param[in] routine_name Name of the calling routine (for logging).
154 * @return Current status as ::YAC_INTERP_EXCH_STATUS.
155 */
157 struct yac_interpolation_exchange * exchange, char const * routine_name);
158
167 struct yac_interpolation_exchange * exchange, double ** recv_data,
168 char const * routine_name);
169
178 struct yac_interpolation_exchange * exchange, double ** recv_data,
179 char const * routine_name);
180
189 struct yac_interpolation_exchange * exchange);
190
198 struct yac_interpolation_exchange * exchange, char const * routine_name);
199
200#endif // INTERPOLATION_EXCHANGE_H
unsigned num_fields
struct Xt_redist_ * Xt_redist
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)
struct Xt_redist_ * Xt_redist
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