1 /*
2  * Copyright (C) by Argonne National Laboratory
3  *     See COPYRIGHT in top-level directory
4  *
5  * DO NOT EDIT: AUTOMATICALLY GENERATED FILE !!
6  */
7 
8 #include <string.h>
9 #include <stdint.h>
10 #include <wchar.h>
11 #include "yaksuri_seqi_pup.h"
12 
yaksuri_seqi_pack_resized_hindexed_int32_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)13 int yaksuri_seqi_pack_resized_hindexed_int32_t(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
14 {
15     int rc = YAKSA_SUCCESS;
16     const char *restrict sbuf = (const char *) inbuf;
17     char *restrict dbuf = (char *) outbuf;
18     uintptr_t extent ATTRIBUTE((unused)) = type->extent;
19 
20     uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
21 
22     int count2 = type->u.resized.child->u.hindexed.count;
23     int *restrict array_of_blocklengths2 = type->u.resized.child->u.hindexed.array_of_blocklengths;
24     intptr_t *restrict array_of_displs2 = type->u.resized.child->u.hindexed.array_of_displs;
25     uintptr_t extent2 ATTRIBUTE((unused)) = type->u.resized.child->extent;
26 
27     uintptr_t idx = 0;
28     for (int i = 0; i < count; i++) {
29         for (int j2 = 0; j2 < count2; j2++) {
30             for (int k2 = 0; k2 < array_of_blocklengths2[j2]; k2++) {
31                 *((int32_t *) (void *) (dbuf + idx)) = *((const int32_t *) (const void *) (sbuf + i * extent + array_of_displs2[j2] + k2 * sizeof(int32_t)));
32                 idx += sizeof(int32_t);
33             }
34         }
35     }
36 
37     return rc;
38 }
39 
yaksuri_seqi_unpack_resized_hindexed_int32_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)40 int yaksuri_seqi_unpack_resized_hindexed_int32_t(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
41 {
42     int rc = YAKSA_SUCCESS;
43     const char *restrict sbuf = (const char *) inbuf;
44     char *restrict dbuf = (char *) outbuf;
45     uintptr_t extent ATTRIBUTE((unused)) = type->extent;
46 
47     uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
48 
49     int count2 = type->u.resized.child->u.hindexed.count;
50     int *restrict array_of_blocklengths2 = type->u.resized.child->u.hindexed.array_of_blocklengths;
51     intptr_t *restrict array_of_displs2 = type->u.resized.child->u.hindexed.array_of_displs;
52     uintptr_t extent2 ATTRIBUTE((unused)) = type->u.resized.child->extent;
53 
54     uintptr_t idx = 0;
55     for (int i = 0; i < count; i++) {
56         for (int j2 = 0; j2 < count2; j2++) {
57             for (int k2 = 0; k2 < array_of_blocklengths2[j2]; k2++) {
58                 *((int32_t *) (void *) (dbuf + i * extent + array_of_displs2[j2] + k2 * sizeof(int32_t))) = *((const int32_t *) (const void *) (sbuf + idx));
59                 idx += sizeof(int32_t);
60             }
61         }
62     }
63 
64     return rc;
65 }
66 
yaksuri_seqi_pack_hvector_resized_hindexed_int32_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)67 int yaksuri_seqi_pack_hvector_resized_hindexed_int32_t(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
68 {
69     int rc = YAKSA_SUCCESS;
70     const char *restrict sbuf = (const char *) inbuf;
71     char *restrict dbuf = (char *) outbuf;
72     uintptr_t extent ATTRIBUTE((unused)) = type->extent;
73 
74     int count1 = type->u.hvector.count;
75     int blocklength1 ATTRIBUTE((unused)) = type->u.hvector.blocklength;
76     intptr_t stride1 = type->u.hvector.stride;
77     uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
78 
79     uintptr_t extent2 ATTRIBUTE((unused)) = type->u.hvector.child->extent;
80 
81     int count3 = type->u.hvector.child->u.resized.child->u.hindexed.count;
82     int *restrict array_of_blocklengths3 = type->u.hvector.child->u.resized.child->u.hindexed.array_of_blocklengths;
83     intptr_t *restrict array_of_displs3 = type->u.hvector.child->u.resized.child->u.hindexed.array_of_displs;
84     uintptr_t extent3 ATTRIBUTE((unused)) = type->u.hvector.child->u.resized.child->extent;
85 
86     uintptr_t idx = 0;
87     for (int i = 0; i < count; i++) {
88         for (int j1 = 0; j1 < count1; j1++) {
89             for (int k1 = 0; k1 < blocklength1; k1++) {
90                 for (int j3 = 0; j3 < count3; j3++) {
91                     for (int k3 = 0; k3 < array_of_blocklengths3[j3]; k3++) {
92                         *((int32_t *) (void *) (dbuf + idx)) = *((const int32_t *) (const void *) (sbuf + i * extent + j1 * stride1 + k1 * extent2 + array_of_displs3[j3] + k3 * sizeof(int32_t)));
93                         idx += sizeof(int32_t);
94                     }
95                 }
96             }
97         }
98     }
99 
100     return rc;
101 }
102 
yaksuri_seqi_unpack_hvector_resized_hindexed_int32_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)103 int yaksuri_seqi_unpack_hvector_resized_hindexed_int32_t(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
104 {
105     int rc = YAKSA_SUCCESS;
106     const char *restrict sbuf = (const char *) inbuf;
107     char *restrict dbuf = (char *) outbuf;
108     uintptr_t extent ATTRIBUTE((unused)) = type->extent;
109 
110     int count1 = type->u.hvector.count;
111     int blocklength1 ATTRIBUTE((unused)) = type->u.hvector.blocklength;
112     intptr_t stride1 = type->u.hvector.stride;
113     uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
114 
115     uintptr_t extent2 ATTRIBUTE((unused)) = type->u.hvector.child->extent;
116 
117     int count3 = type->u.hvector.child->u.resized.child->u.hindexed.count;
118     int *restrict array_of_blocklengths3 = type->u.hvector.child->u.resized.child->u.hindexed.array_of_blocklengths;
119     intptr_t *restrict array_of_displs3 = type->u.hvector.child->u.resized.child->u.hindexed.array_of_displs;
120     uintptr_t extent3 ATTRIBUTE((unused)) = type->u.hvector.child->u.resized.child->extent;
121 
122     uintptr_t idx = 0;
123     for (int i = 0; i < count; i++) {
124         for (int j1 = 0; j1 < count1; j1++) {
125             for (int k1 = 0; k1 < blocklength1; k1++) {
126                 for (int j3 = 0; j3 < count3; j3++) {
127                     for (int k3 = 0; k3 < array_of_blocklengths3[j3]; k3++) {
128                         *((int32_t *) (void *) (dbuf + i * extent + j1 * stride1 + k1 * extent2 + array_of_displs3[j3] + k3 * sizeof(int32_t))) = *((const int32_t *) (const void *) (sbuf + idx));
129                         idx += sizeof(int32_t);
130                     }
131                 }
132             }
133         }
134     }
135 
136     return rc;
137 }
138 
yaksuri_seqi_pack_blkhindx_resized_hindexed_int32_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)139 int yaksuri_seqi_pack_blkhindx_resized_hindexed_int32_t(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
140 {
141     int rc = YAKSA_SUCCESS;
142     const char *restrict sbuf = (const char *) inbuf;
143     char *restrict dbuf = (char *) outbuf;
144     uintptr_t extent ATTRIBUTE((unused)) = type->extent;
145 
146     int count1 = type->u.blkhindx.count;
147     int blocklength1 ATTRIBUTE((unused)) = type->u.blkhindx.blocklength;
148     intptr_t *restrict array_of_displs1 = type->u.blkhindx.array_of_displs;
149     uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
150 
151     uintptr_t extent2 ATTRIBUTE((unused)) = type->u.blkhindx.child->extent;
152 
153     int count3 = type->u.blkhindx.child->u.resized.child->u.hindexed.count;
154     int *restrict array_of_blocklengths3 = type->u.blkhindx.child->u.resized.child->u.hindexed.array_of_blocklengths;
155     intptr_t *restrict array_of_displs3 = type->u.blkhindx.child->u.resized.child->u.hindexed.array_of_displs;
156     uintptr_t extent3 ATTRIBUTE((unused)) = type->u.blkhindx.child->u.resized.child->extent;
157 
158     uintptr_t idx = 0;
159     for (int i = 0; i < count; i++) {
160         for (int j1 = 0; j1 < count1; j1++) {
161             for (int k1 = 0; k1 < blocklength1; k1++) {
162                 for (int j3 = 0; j3 < count3; j3++) {
163                     for (int k3 = 0; k3 < array_of_blocklengths3[j3]; k3++) {
164                         *((int32_t *) (void *) (dbuf + idx)) = *((const int32_t *) (const void *) (sbuf + i * extent + array_of_displs1[j1] + k1 * extent2 + array_of_displs3[j3] + k3 * sizeof(int32_t)));
165                         idx += sizeof(int32_t);
166                     }
167                 }
168             }
169         }
170     }
171 
172     return rc;
173 }
174 
yaksuri_seqi_unpack_blkhindx_resized_hindexed_int32_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)175 int yaksuri_seqi_unpack_blkhindx_resized_hindexed_int32_t(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
176 {
177     int rc = YAKSA_SUCCESS;
178     const char *restrict sbuf = (const char *) inbuf;
179     char *restrict dbuf = (char *) outbuf;
180     uintptr_t extent ATTRIBUTE((unused)) = type->extent;
181 
182     int count1 = type->u.blkhindx.count;
183     int blocklength1 ATTRIBUTE((unused)) = type->u.blkhindx.blocklength;
184     intptr_t *restrict array_of_displs1 = type->u.blkhindx.array_of_displs;
185     uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
186 
187     uintptr_t extent2 ATTRIBUTE((unused)) = type->u.blkhindx.child->extent;
188 
189     int count3 = type->u.blkhindx.child->u.resized.child->u.hindexed.count;
190     int *restrict array_of_blocklengths3 = type->u.blkhindx.child->u.resized.child->u.hindexed.array_of_blocklengths;
191     intptr_t *restrict array_of_displs3 = type->u.blkhindx.child->u.resized.child->u.hindexed.array_of_displs;
192     uintptr_t extent3 ATTRIBUTE((unused)) = type->u.blkhindx.child->u.resized.child->extent;
193 
194     uintptr_t idx = 0;
195     for (int i = 0; i < count; i++) {
196         for (int j1 = 0; j1 < count1; j1++) {
197             for (int k1 = 0; k1 < blocklength1; k1++) {
198                 for (int j3 = 0; j3 < count3; j3++) {
199                     for (int k3 = 0; k3 < array_of_blocklengths3[j3]; k3++) {
200                         *((int32_t *) (void *) (dbuf + i * extent + array_of_displs1[j1] + k1 * extent2 + array_of_displs3[j3] + k3 * sizeof(int32_t))) = *((const int32_t *) (const void *) (sbuf + idx));
201                         idx += sizeof(int32_t);
202                     }
203                 }
204             }
205         }
206     }
207 
208     return rc;
209 }
210 
yaksuri_seqi_pack_hindexed_resized_hindexed_int32_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)211 int yaksuri_seqi_pack_hindexed_resized_hindexed_int32_t(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
212 {
213     int rc = YAKSA_SUCCESS;
214     const char *restrict sbuf = (const char *) inbuf;
215     char *restrict dbuf = (char *) outbuf;
216     uintptr_t extent ATTRIBUTE((unused)) = type->extent;
217 
218     int count1 = type->u.hindexed.count;
219     int *restrict array_of_blocklengths1 = type->u.hindexed.array_of_blocklengths;
220     intptr_t *restrict array_of_displs1 = type->u.hindexed.array_of_displs;
221     uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
222 
223     uintptr_t extent2 ATTRIBUTE((unused)) = type->u.hindexed.child->extent;
224 
225     int count3 = type->u.hindexed.child->u.resized.child->u.hindexed.count;
226     int *restrict array_of_blocklengths3 = type->u.hindexed.child->u.resized.child->u.hindexed.array_of_blocklengths;
227     intptr_t *restrict array_of_displs3 = type->u.hindexed.child->u.resized.child->u.hindexed.array_of_displs;
228     uintptr_t extent3 ATTRIBUTE((unused)) = type->u.hindexed.child->u.resized.child->extent;
229 
230     uintptr_t idx = 0;
231     for (int i = 0; i < count; i++) {
232         for (int j1 = 0; j1 < count1; j1++) {
233             for (int k1 = 0; k1 < array_of_blocklengths1[j1]; k1++) {
234                 for (int j3 = 0; j3 < count3; j3++) {
235                     for (int k3 = 0; k3 < array_of_blocklengths3[j3]; k3++) {
236                         *((int32_t *) (void *) (dbuf + idx)) = *((const int32_t *) (const void *) (sbuf + i * extent + array_of_displs1[j1] + k1 * extent2 + array_of_displs3[j3] + k3 * sizeof(int32_t)));
237                         idx += sizeof(int32_t);
238                     }
239                 }
240             }
241         }
242     }
243 
244     return rc;
245 }
246 
yaksuri_seqi_unpack_hindexed_resized_hindexed_int32_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)247 int yaksuri_seqi_unpack_hindexed_resized_hindexed_int32_t(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
248 {
249     int rc = YAKSA_SUCCESS;
250     const char *restrict sbuf = (const char *) inbuf;
251     char *restrict dbuf = (char *) outbuf;
252     uintptr_t extent ATTRIBUTE((unused)) = type->extent;
253 
254     int count1 = type->u.hindexed.count;
255     int *restrict array_of_blocklengths1 = type->u.hindexed.array_of_blocklengths;
256     intptr_t *restrict array_of_displs1 = type->u.hindexed.array_of_displs;
257     uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
258 
259     uintptr_t extent2 ATTRIBUTE((unused)) = type->u.hindexed.child->extent;
260 
261     int count3 = type->u.hindexed.child->u.resized.child->u.hindexed.count;
262     int *restrict array_of_blocklengths3 = type->u.hindexed.child->u.resized.child->u.hindexed.array_of_blocklengths;
263     intptr_t *restrict array_of_displs3 = type->u.hindexed.child->u.resized.child->u.hindexed.array_of_displs;
264     uintptr_t extent3 ATTRIBUTE((unused)) = type->u.hindexed.child->u.resized.child->extent;
265 
266     uintptr_t idx = 0;
267     for (int i = 0; i < count; i++) {
268         for (int j1 = 0; j1 < count1; j1++) {
269             for (int k1 = 0; k1 < array_of_blocklengths1[j1]; k1++) {
270                 for (int j3 = 0; j3 < count3; j3++) {
271                     for (int k3 = 0; k3 < array_of_blocklengths3[j3]; k3++) {
272                         *((int32_t *) (void *) (dbuf + i * extent + array_of_displs1[j1] + k1 * extent2 + array_of_displs3[j3] + k3 * sizeof(int32_t))) = *((const int32_t *) (const void *) (sbuf + idx));
273                         idx += sizeof(int32_t);
274                     }
275                 }
276             }
277         }
278     }
279 
280     return rc;
281 }
282 
yaksuri_seqi_pack_contig_resized_hindexed_int32_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)283 int yaksuri_seqi_pack_contig_resized_hindexed_int32_t(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
284 {
285     int rc = YAKSA_SUCCESS;
286     const char *restrict sbuf = (const char *) inbuf;
287     char *restrict dbuf = (char *) outbuf;
288     uintptr_t extent ATTRIBUTE((unused)) = type->extent;
289 
290     int count1 = type->u.contig.count;
291     intptr_t stride1 = type->u.contig.child->extent;
292     uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
293 
294     uintptr_t extent2 ATTRIBUTE((unused)) = type->u.contig.child->extent;
295 
296     int count3 = type->u.contig.child->u.resized.child->u.hindexed.count;
297     int *restrict array_of_blocklengths3 = type->u.contig.child->u.resized.child->u.hindexed.array_of_blocklengths;
298     intptr_t *restrict array_of_displs3 = type->u.contig.child->u.resized.child->u.hindexed.array_of_displs;
299     uintptr_t extent3 ATTRIBUTE((unused)) = type->u.contig.child->u.resized.child->extent;
300 
301     uintptr_t idx = 0;
302     for (int i = 0; i < count; i++) {
303         for (int j1 = 0; j1 < count1; j1++) {
304             for (int j3 = 0; j3 < count3; j3++) {
305                 for (int k3 = 0; k3 < array_of_blocklengths3[j3]; k3++) {
306                     *((int32_t *) (void *) (dbuf + idx)) = *((const int32_t *) (const void *) (sbuf + i * extent + j1 * stride1 + array_of_displs3[j3] + k3 * sizeof(int32_t)));
307                     idx += sizeof(int32_t);
308                 }
309             }
310         }
311     }
312 
313     return rc;
314 }
315 
yaksuri_seqi_unpack_contig_resized_hindexed_int32_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)316 int yaksuri_seqi_unpack_contig_resized_hindexed_int32_t(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
317 {
318     int rc = YAKSA_SUCCESS;
319     const char *restrict sbuf = (const char *) inbuf;
320     char *restrict dbuf = (char *) outbuf;
321     uintptr_t extent ATTRIBUTE((unused)) = type->extent;
322 
323     int count1 = type->u.contig.count;
324     intptr_t stride1 = type->u.contig.child->extent;
325     uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
326 
327     uintptr_t extent2 ATTRIBUTE((unused)) = type->u.contig.child->extent;
328 
329     int count3 = type->u.contig.child->u.resized.child->u.hindexed.count;
330     int *restrict array_of_blocklengths3 = type->u.contig.child->u.resized.child->u.hindexed.array_of_blocklengths;
331     intptr_t *restrict array_of_displs3 = type->u.contig.child->u.resized.child->u.hindexed.array_of_displs;
332     uintptr_t extent3 ATTRIBUTE((unused)) = type->u.contig.child->u.resized.child->extent;
333 
334     uintptr_t idx = 0;
335     for (int i = 0; i < count; i++) {
336         for (int j1 = 0; j1 < count1; j1++) {
337             for (int j3 = 0; j3 < count3; j3++) {
338                 for (int k3 = 0; k3 < array_of_blocklengths3[j3]; k3++) {
339                     *((int32_t *) (void *) (dbuf + i * extent + j1 * stride1 + array_of_displs3[j3] + k3 * sizeof(int32_t))) = *((const int32_t *) (const void *) (sbuf + idx));
340                     idx += sizeof(int32_t);
341                 }
342             }
343         }
344     }
345 
346     return rc;
347 }
348 
yaksuri_seqi_pack_resized_resized_hindexed_int32_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)349 int yaksuri_seqi_pack_resized_resized_hindexed_int32_t(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
350 {
351     int rc = YAKSA_SUCCESS;
352     const char *restrict sbuf = (const char *) inbuf;
353     char *restrict dbuf = (char *) outbuf;
354     uintptr_t extent ATTRIBUTE((unused)) = type->extent;
355 
356     uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
357 
358     uintptr_t extent2 ATTRIBUTE((unused)) = type->u.resized.child->extent;
359 
360     int count3 = type->u.resized.child->u.resized.child->u.hindexed.count;
361     int *restrict array_of_blocklengths3 = type->u.resized.child->u.resized.child->u.hindexed.array_of_blocklengths;
362     intptr_t *restrict array_of_displs3 = type->u.resized.child->u.resized.child->u.hindexed.array_of_displs;
363     uintptr_t extent3 ATTRIBUTE((unused)) = type->u.resized.child->u.resized.child->extent;
364 
365     uintptr_t idx = 0;
366     for (int i = 0; i < count; i++) {
367         for (int j3 = 0; j3 < count3; j3++) {
368             for (int k3 = 0; k3 < array_of_blocklengths3[j3]; k3++) {
369                 *((int32_t *) (void *) (dbuf + idx)) = *((const int32_t *) (const void *) (sbuf + i * extent + array_of_displs3[j3] + k3 * sizeof(int32_t)));
370                 idx += sizeof(int32_t);
371             }
372         }
373     }
374 
375     return rc;
376 }
377 
yaksuri_seqi_unpack_resized_resized_hindexed_int32_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)378 int yaksuri_seqi_unpack_resized_resized_hindexed_int32_t(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
379 {
380     int rc = YAKSA_SUCCESS;
381     const char *restrict sbuf = (const char *) inbuf;
382     char *restrict dbuf = (char *) outbuf;
383     uintptr_t extent ATTRIBUTE((unused)) = type->extent;
384 
385     uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
386 
387     uintptr_t extent2 ATTRIBUTE((unused)) = type->u.resized.child->extent;
388 
389     int count3 = type->u.resized.child->u.resized.child->u.hindexed.count;
390     int *restrict array_of_blocklengths3 = type->u.resized.child->u.resized.child->u.hindexed.array_of_blocklengths;
391     intptr_t *restrict array_of_displs3 = type->u.resized.child->u.resized.child->u.hindexed.array_of_displs;
392     uintptr_t extent3 ATTRIBUTE((unused)) = type->u.resized.child->u.resized.child->extent;
393 
394     uintptr_t idx = 0;
395     for (int i = 0; i < count; i++) {
396         for (int j3 = 0; j3 < count3; j3++) {
397             for (int k3 = 0; k3 < array_of_blocklengths3[j3]; k3++) {
398                 *((int32_t *) (void *) (dbuf + i * extent + array_of_displs3[j3] + k3 * sizeof(int32_t))) = *((const int32_t *) (const void *) (sbuf + idx));
399                 idx += sizeof(int32_t);
400             }
401         }
402     }
403 
404     return rc;
405 }
406 
407