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_blkhindx_resized_float(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)13 int yaksuri_seqi_pack_blkhindx_resized_float(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 int count1 = type->u.blkhindx.count;
21 int blocklength1 ATTRIBUTE((unused)) = type->u.blkhindx.blocklength;
22 intptr_t *restrict array_of_displs1 = type->u.blkhindx.array_of_displs;
23 uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
24
25 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.blkhindx.child->extent;
26
27 uintptr_t idx = 0;
28 for (int i = 0; i < count; i++) {
29 for (int j1 = 0; j1 < count1; j1++) {
30 for (int k1 = 0; k1 < blocklength1; k1++) {
31 *((float *) (void *) (dbuf + idx)) = *((const float *) (const void *) (sbuf + i * extent + array_of_displs1[j1] + k1 * extent2));
32 idx += sizeof(float);
33 }
34 }
35 }
36
37 return rc;
38 }
39
yaksuri_seqi_unpack_blkhindx_resized_float(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)40 int yaksuri_seqi_unpack_blkhindx_resized_float(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 int count1 = type->u.blkhindx.count;
48 int blocklength1 ATTRIBUTE((unused)) = type->u.blkhindx.blocklength;
49 intptr_t *restrict array_of_displs1 = type->u.blkhindx.array_of_displs;
50 uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
51
52 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.blkhindx.child->extent;
53
54 uintptr_t idx = 0;
55 for (int i = 0; i < count; i++) {
56 for (int j1 = 0; j1 < count1; j1++) {
57 for (int k1 = 0; k1 < blocklength1; k1++) {
58 *((float *) (void *) (dbuf + i * extent + array_of_displs1[j1] + k1 * extent2)) = *((const float *) (const void *) (sbuf + idx));
59 idx += sizeof(float);
60 }
61 }
62 }
63
64 return rc;
65 }
66
yaksuri_seqi_pack_hvector_blkhindx_resized_float(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)67 int yaksuri_seqi_pack_hvector_blkhindx_resized_float(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 int count2 = type->u.hvector.child->u.blkhindx.count;
80 int blocklength2 ATTRIBUTE((unused)) = type->u.hvector.child->u.blkhindx.blocklength;
81 intptr_t *restrict array_of_displs2 = type->u.hvector.child->u.blkhindx.array_of_displs;
82 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.hvector.child->extent;
83
84 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.hvector.child->u.blkhindx.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 j2 = 0; j2 < count2; j2++) {
91 for (int k2 = 0; k2 < blocklength2; k2++) {
92 *((float *) (void *) (dbuf + idx)) = *((const float *) (const void *) (sbuf + i * extent + j1 * stride1 + k1 * extent2 + array_of_displs2[j2] + k2 * extent3));
93 idx += sizeof(float);
94 }
95 }
96 }
97 }
98 }
99
100 return rc;
101 }
102
yaksuri_seqi_unpack_hvector_blkhindx_resized_float(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)103 int yaksuri_seqi_unpack_hvector_blkhindx_resized_float(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 int count2 = type->u.hvector.child->u.blkhindx.count;
116 int blocklength2 ATTRIBUTE((unused)) = type->u.hvector.child->u.blkhindx.blocklength;
117 intptr_t *restrict array_of_displs2 = type->u.hvector.child->u.blkhindx.array_of_displs;
118 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.hvector.child->extent;
119
120 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.hvector.child->u.blkhindx.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 j2 = 0; j2 < count2; j2++) {
127 for (int k2 = 0; k2 < blocklength2; k2++) {
128 *((float *) (void *) (dbuf + i * extent + j1 * stride1 + k1 * extent2 + array_of_displs2[j2] + k2 * extent3)) = *((const float *) (const void *) (sbuf + idx));
129 idx += sizeof(float);
130 }
131 }
132 }
133 }
134 }
135
136 return rc;
137 }
138
yaksuri_seqi_pack_blkhindx_blkhindx_resized_float(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)139 int yaksuri_seqi_pack_blkhindx_blkhindx_resized_float(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 int count2 = type->u.blkhindx.child->u.blkhindx.count;
152 int blocklength2 ATTRIBUTE((unused)) = type->u.blkhindx.child->u.blkhindx.blocklength;
153 intptr_t *restrict array_of_displs2 = type->u.blkhindx.child->u.blkhindx.array_of_displs;
154 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.blkhindx.child->extent;
155
156 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.blkhindx.child->u.blkhindx.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 j2 = 0; j2 < count2; j2++) {
163 for (int k2 = 0; k2 < blocklength2; k2++) {
164 *((float *) (void *) (dbuf + idx)) = *((const float *) (const void *) (sbuf + i * extent + array_of_displs1[j1] + k1 * extent2 + array_of_displs2[j2] + k2 * extent3));
165 idx += sizeof(float);
166 }
167 }
168 }
169 }
170 }
171
172 return rc;
173 }
174
yaksuri_seqi_unpack_blkhindx_blkhindx_resized_float(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)175 int yaksuri_seqi_unpack_blkhindx_blkhindx_resized_float(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 int count2 = type->u.blkhindx.child->u.blkhindx.count;
188 int blocklength2 ATTRIBUTE((unused)) = type->u.blkhindx.child->u.blkhindx.blocklength;
189 intptr_t *restrict array_of_displs2 = type->u.blkhindx.child->u.blkhindx.array_of_displs;
190 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.blkhindx.child->extent;
191
192 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.blkhindx.child->u.blkhindx.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 j2 = 0; j2 < count2; j2++) {
199 for (int k2 = 0; k2 < blocklength2; k2++) {
200 *((float *) (void *) (dbuf + i * extent + array_of_displs1[j1] + k1 * extent2 + array_of_displs2[j2] + k2 * extent3)) = *((const float *) (const void *) (sbuf + idx));
201 idx += sizeof(float);
202 }
203 }
204 }
205 }
206 }
207
208 return rc;
209 }
210
yaksuri_seqi_pack_hindexed_blkhindx_resized_float(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)211 int yaksuri_seqi_pack_hindexed_blkhindx_resized_float(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 int count2 = type->u.hindexed.child->u.blkhindx.count;
224 int blocklength2 ATTRIBUTE((unused)) = type->u.hindexed.child->u.blkhindx.blocklength;
225 intptr_t *restrict array_of_displs2 = type->u.hindexed.child->u.blkhindx.array_of_displs;
226 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.hindexed.child->extent;
227
228 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.hindexed.child->u.blkhindx.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 j2 = 0; j2 < count2; j2++) {
235 for (int k2 = 0; k2 < blocklength2; k2++) {
236 *((float *) (void *) (dbuf + idx)) = *((const float *) (const void *) (sbuf + i * extent + array_of_displs1[j1] + k1 * extent2 + array_of_displs2[j2] + k2 * extent3));
237 idx += sizeof(float);
238 }
239 }
240 }
241 }
242 }
243
244 return rc;
245 }
246
yaksuri_seqi_unpack_hindexed_blkhindx_resized_float(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)247 int yaksuri_seqi_unpack_hindexed_blkhindx_resized_float(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 int count2 = type->u.hindexed.child->u.blkhindx.count;
260 int blocklength2 ATTRIBUTE((unused)) = type->u.hindexed.child->u.blkhindx.blocklength;
261 intptr_t *restrict array_of_displs2 = type->u.hindexed.child->u.blkhindx.array_of_displs;
262 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.hindexed.child->extent;
263
264 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.hindexed.child->u.blkhindx.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 j2 = 0; j2 < count2; j2++) {
271 for (int k2 = 0; k2 < blocklength2; k2++) {
272 *((float *) (void *) (dbuf + i * extent + array_of_displs1[j1] + k1 * extent2 + array_of_displs2[j2] + k2 * extent3)) = *((const float *) (const void *) (sbuf + idx));
273 idx += sizeof(float);
274 }
275 }
276 }
277 }
278 }
279
280 return rc;
281 }
282
yaksuri_seqi_pack_contig_blkhindx_resized_float(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)283 int yaksuri_seqi_pack_contig_blkhindx_resized_float(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 int count2 = type->u.contig.child->u.blkhindx.count;
295 int blocklength2 ATTRIBUTE((unused)) = type->u.contig.child->u.blkhindx.blocklength;
296 intptr_t *restrict array_of_displs2 = type->u.contig.child->u.blkhindx.array_of_displs;
297 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.contig.child->extent;
298
299 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.contig.child->u.blkhindx.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 j2 = 0; j2 < count2; j2++) {
305 for (int k2 = 0; k2 < blocklength2; k2++) {
306 *((float *) (void *) (dbuf + idx)) = *((const float *) (const void *) (sbuf + i * extent + j1 * stride1 + array_of_displs2[j2] + k2 * extent3));
307 idx += sizeof(float);
308 }
309 }
310 }
311 }
312
313 return rc;
314 }
315
yaksuri_seqi_unpack_contig_blkhindx_resized_float(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)316 int yaksuri_seqi_unpack_contig_blkhindx_resized_float(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 int count2 = type->u.contig.child->u.blkhindx.count;
328 int blocklength2 ATTRIBUTE((unused)) = type->u.contig.child->u.blkhindx.blocklength;
329 intptr_t *restrict array_of_displs2 = type->u.contig.child->u.blkhindx.array_of_displs;
330 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.contig.child->extent;
331
332 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.contig.child->u.blkhindx.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 j2 = 0; j2 < count2; j2++) {
338 for (int k2 = 0; k2 < blocklength2; k2++) {
339 *((float *) (void *) (dbuf + i * extent + j1 * stride1 + array_of_displs2[j2] + k2 * extent3)) = *((const float *) (const void *) (sbuf + idx));
340 idx += sizeof(float);
341 }
342 }
343 }
344 }
345
346 return rc;
347 }
348
yaksuri_seqi_pack_resized_blkhindx_resized_float(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)349 int yaksuri_seqi_pack_resized_blkhindx_resized_float(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 int count2 = type->u.resized.child->u.blkhindx.count;
359 int blocklength2 ATTRIBUTE((unused)) = type->u.resized.child->u.blkhindx.blocklength;
360 intptr_t *restrict array_of_displs2 = type->u.resized.child->u.blkhindx.array_of_displs;
361 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.resized.child->extent;
362
363 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.resized.child->u.blkhindx.child->extent;
364
365 uintptr_t idx = 0;
366 for (int i = 0; i < count; i++) {
367 for (int j2 = 0; j2 < count2; j2++) {
368 for (int k2 = 0; k2 < blocklength2; k2++) {
369 *((float *) (void *) (dbuf + idx)) = *((const float *) (const void *) (sbuf + i * extent + array_of_displs2[j2] + k2 * extent3));
370 idx += sizeof(float);
371 }
372 }
373 }
374
375 return rc;
376 }
377
yaksuri_seqi_unpack_resized_blkhindx_resized_float(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)378 int yaksuri_seqi_unpack_resized_blkhindx_resized_float(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 int count2 = type->u.resized.child->u.blkhindx.count;
388 int blocklength2 ATTRIBUTE((unused)) = type->u.resized.child->u.blkhindx.blocklength;
389 intptr_t *restrict array_of_displs2 = type->u.resized.child->u.blkhindx.array_of_displs;
390 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.resized.child->extent;
391
392 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.resized.child->u.blkhindx.child->extent;
393
394 uintptr_t idx = 0;
395 for (int i = 0; i < count; i++) {
396 for (int j2 = 0; j2 < count2; j2++) {
397 for (int k2 = 0; k2 < blocklength2; k2++) {
398 *((float *) (void *) (dbuf + i * extent + array_of_displs2[j2] + k2 * extent3)) = *((const float *) (const void *) (sbuf + idx));
399 idx += sizeof(float);
400 }
401 }
402 }
403
404 return rc;
405 }
406
407