1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2017 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2017 Intel, Inc. All rights reserved.
* Copyright (c) 2021-2022 Nanook Consulting. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
/** @file
*
* Utility functions to manage fortran <-> c opaque object
* translation. Note that since MPI defines fortran handles as
* [signed] int's, we use int everywhere in here where you would
* normally expect size_t. There's some code that makes sure indices
* don't go above FORTRAN_HANDLE_MAX (which is min(INT_MAX, fortran
* INTEGER max)), just to be sure.
*/
/**
* dynamic pointer array
*/
;
/**
* Convenience typedef
*/
typedef struct pmix_pointer_array_t pmix_pointer_array_t;
/**
* Class declaration
*/
PMIX_EXPORT ;
/**
* Initialize the pointer array with an initial size of initial_allocation.
* Set the maximum size of the array, as well as the size of the allocation
* block for all subsequent growing operations. Remarque: The pointer array
* has to be created bfore calling this function.
*
* @param array Pointer to pointer of an array (IN/OUT)
* @param initial_allocation The number of elements in the initial array (IN)
* @param max_size The maximum size of the array (IN)
* @param block_size The size for all subsequent grows of the array (IN).
*
* @return PMIX_SUCCESS if all initializations were successful. Otherwise,
* the error indicate what went wrong in the function.
*/
PMIX_EXPORT int ;
/**
* Add a pointer to the array (Grow the array, if need be)
*
* @param array Pointer to array (IN)
* @param ptr Pointer value (IN)
*
* @return Index of inserted array element. Return value of
* (-1) indicates an error.
*/
PMIX_EXPORT int ;
/**
* Set the value of an element in array
*
* @param array Pointer to array (IN)
* @param index Index of element to be reset (IN)
* @param value New value to be set at element index (IN)
*
* @return Error code. (-1) indicates an error.
*/
PMIX_EXPORT int ;
/**
* Get the value of an element in array
*
* @param array Pointer to array (IN)
* @param element_index Index of element to be returned (IN)
*
* @return Error code. NULL indicates an error.
*/
static inline void *
/**
* Get the size of the pointer array
*
* @param array Pointer to array (IN)
*
* @returns size Size of the array
*
* Simple inline function to return the size of the array in order to
* hide the member field from external users.
*/
static inline int
/**
* Set the size of the pointer array
*
* @param array Pointer to array (IN)
*
* @param size Desired size of the array
*
* Simple function to set the size of the array in order to
* hide the member field from external users.
*/
PMIX_EXPORT int ;
/**
* Test whether a certain element is already in use. If not yet
* in use, reserve it.
*
* @param array Pointer to array (IN)
* @param index Index of element to be tested (IN)
* @param value New value to be set at element index (IN)
*
* @return true/false True if element could be reserved
* False if element could not be reserved (e.g., in use).
*
* In contrary to array_set, this function does not allow to overwrite
* a value, unless the previous value is NULL ( equiv. to free ).
*/
PMIX_EXPORT bool ;
/**
* Empty the array.
*
* @param array Pointer to array (IN)
*
*/
static inline void
/* PMIX_POINTER_ARRAY_H */