Yet Another eXchange Tool 0.11.3
Loading...
Searching...
No Matches
xt_exchanger_team.c
Go to the documentation of this file.
1
12/*
13 * Keywords:
14 * Maintainer: Jörg Behrens <behrens@dkrz.de>
15 * Moritz Hanke <hanke@dkrz.de>
16 * Thomas Jahns <jahns@dkrz.de>
17 * URL: https://dkrz-sw.gitlab-pages.dkrz.de/yaxt/
18 *
19 * Redistribution and use in source and binary forms, with or without
20 * modification, are permitted provided that the following conditions are
21 * met:
22 *
23 * Redistributions of source code must retain the above copyright notice,
24 * this list of conditions and the following disclaimer.
25 *
26 * Redistributions in binary form must reproduce the above copyright
27 * notice, this list of conditions and the following disclaimer in the
28 * documentation and/or other materials provided with the distribution.
29 *
30 * Neither the name of the DKRZ GmbH nor the names of its contributors
31 * may be used to endorse or promote products derived from this software
32 * without specific prior written permission.
33 *
34 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
35 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
36 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
37 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
38 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
39 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
40 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
41 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
42 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
43 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
44 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
45 */
46#ifdef HAVE_CONFIG_H
47#include <config.h>
48#endif
49
50#include "xt_exchanger.h"
51
52
53
54size_t
56{
57 return exchanger->vtable->team_share_size;
58}
59
60size_t
65
66void
68 void *share)
69{
70 const struct xt_exchanger_vtable *vtab = exchanger->vtable;
71 if (vtab && vtab->team_share_default_init)
72 vtab->team_share_default_init(share);
73}
74
75void
77 void *share)
78{
79 const struct xt_exchanger_vtable *vtab
80 = xt_exchanger_new_get_vtable(exchanger_new);
81 if (vtab && vtab->team_share_default_init)
82 vtab->team_share_default_init(share);
83}
84
85void
87{
88 const struct xt_exchanger_vtable *vtab = exchanger->vtable;
89 if (vtab && vtab->team_share_destroy)
90 vtab->team_share_destroy(share);
91}
92
93void
95 void *share)
96{
97 const struct xt_exchanger_vtable *vtab
98 = xt_exchanger_new_get_vtable(exchanger_new);
99 if (vtab && vtab->team_share_destroy)
100 vtab->team_share_destroy(share);
101}
102
103/*
104 * Local Variables:
105 * c-basic-offset: 2
106 * coding: utf-8
107 * indent-tabs-mode: nil
108 * show-trailing-whitespace: t
109 * require-trailing-newline: t
110 * End:
111 */
112
struct xt_exchanger_vtable * vtable
void(* team_share_destroy)(void *share)
void(* team_share_default_init)(void *share)
exchanging of data based on information provided by redist's
PPM_DSO_INTERNAL const struct xt_exchanger_vtable * xt_exchanger_new_get_vtable(Xt_exchanger_new exchanger_new)
struct Xt_exchanger_ * Xt_exchanger
Xt_exchanger(* Xt_exchanger_new)(int nsend, int nrecv, const struct Xt_redist_msg *send_msgs, const struct Xt_redist_msg *recv_msgs, MPI_Comm comm, int tag_offset, Xt_config config)
void xt_exchanger_new_team_share_destroy(Xt_exchanger_new exchanger_new, void *share)
size_t xt_exchanger_team_get_share_size(Xt_exchanger exchanger)
size_t xt_exchanger_new_team_get_share_size(Xt_exchanger_new exchanger_new)
void xt_exchanger_team_share_default_init(Xt_exchanger exchanger, void *share)
void xt_exchanger_new_team_share_default_init(Xt_exchanger_new exchanger_new, void *share)
void xt_exchanger_team_share_destroy(Xt_exchanger exchanger, void *share)