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_hvector_hindexed_double(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)13 int yaksuri_seqi_pack_hvector_hindexed_double(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.hvector.count;
21 int blocklength1 ATTRIBUTE((unused)) = type->u.hvector.blocklength;
22 intptr_t stride1 = type->u.hvector.stride;
23 uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
24
25 int count2 = type->u.hvector.child->u.hindexed.count;
26 int *restrict array_of_blocklengths2 = type->u.hvector.child->u.hindexed.array_of_blocklengths;
27 intptr_t *restrict array_of_displs2 = type->u.hvector.child->u.hindexed.array_of_displs;
28 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.hvector.child->extent;
29
30 uintptr_t idx = 0;
31 for (int i = 0; i < count; i++) {
32 for (int j1 = 0; j1 < count1; j1++) {
33 for (int k1 = 0; k1 < blocklength1; k1++) {
34 for (int j2 = 0; j2 < count2; j2++) {
35 for (int k2 = 0; k2 < array_of_blocklengths2[j2]; k2++) {
36 *((double *) (void *) (dbuf + idx)) = *((const double *) (const void *) (sbuf + i * extent + j1 * stride1 + k1 * extent2 + array_of_displs2[j2] + k2 * sizeof(double)));
37 idx += sizeof(double);
38 }
39 }
40 }
41 }
42 }
43
44 return rc;
45 }
46
yaksuri_seqi_unpack_hvector_hindexed_double(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)47 int yaksuri_seqi_unpack_hvector_hindexed_double(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
48 {
49 int rc = YAKSA_SUCCESS;
50 const char *restrict sbuf = (const char *) inbuf;
51 char *restrict dbuf = (char *) outbuf;
52 uintptr_t extent ATTRIBUTE((unused)) = type->extent;
53
54 int count1 = type->u.hvector.count;
55 int blocklength1 ATTRIBUTE((unused)) = type->u.hvector.blocklength;
56 intptr_t stride1 = type->u.hvector.stride;
57 uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
58
59 int count2 = type->u.hvector.child->u.hindexed.count;
60 int *restrict array_of_blocklengths2 = type->u.hvector.child->u.hindexed.array_of_blocklengths;
61 intptr_t *restrict array_of_displs2 = type->u.hvector.child->u.hindexed.array_of_displs;
62 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.hvector.child->extent;
63
64 uintptr_t idx = 0;
65 for (int i = 0; i < count; i++) {
66 for (int j1 = 0; j1 < count1; j1++) {
67 for (int k1 = 0; k1 < blocklength1; k1++) {
68 for (int j2 = 0; j2 < count2; j2++) {
69 for (int k2 = 0; k2 < array_of_blocklengths2[j2]; k2++) {
70 *((double *) (void *) (dbuf + i * extent + j1 * stride1 + k1 * extent2 + array_of_displs2[j2] + k2 * sizeof(double))) = *((const double *) (const void *) (sbuf + idx));
71 idx += sizeof(double);
72 }
73 }
74 }
75 }
76 }
77
78 return rc;
79 }
80
yaksuri_seqi_pack_hvector_hvector_hindexed_double(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)81 int yaksuri_seqi_pack_hvector_hvector_hindexed_double(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
82 {
83 int rc = YAKSA_SUCCESS;
84 const char *restrict sbuf = (const char *) inbuf;
85 char *restrict dbuf = (char *) outbuf;
86 uintptr_t extent ATTRIBUTE((unused)) = type->extent;
87
88 int count1 = type->u.hvector.count;
89 int blocklength1 ATTRIBUTE((unused)) = type->u.hvector.blocklength;
90 intptr_t stride1 = type->u.hvector.stride;
91 uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
92
93 int count2 = type->u.hvector.child->u.hvector.count;
94 int blocklength2 ATTRIBUTE((unused)) = type->u.hvector.child->u.hvector.blocklength;
95 intptr_t stride2 = type->u.hvector.child->u.hvector.stride;
96 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.hvector.child->extent;
97
98 int count3 = type->u.hvector.child->u.hvector.child->u.hindexed.count;
99 int *restrict array_of_blocklengths3 = type->u.hvector.child->u.hvector.child->u.hindexed.array_of_blocklengths;
100 intptr_t *restrict array_of_displs3 = type->u.hvector.child->u.hvector.child->u.hindexed.array_of_displs;
101 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.hvector.child->u.hvector.child->extent;
102
103 uintptr_t idx = 0;
104 for (int i = 0; i < count; i++) {
105 for (int j1 = 0; j1 < count1; j1++) {
106 for (int k1 = 0; k1 < blocklength1; k1++) {
107 for (int j2 = 0; j2 < count2; j2++) {
108 for (int k2 = 0; k2 < blocklength2; k2++) {
109 for (int j3 = 0; j3 < count3; j3++) {
110 for (int k3 = 0; k3 < array_of_blocklengths3[j3]; k3++) {
111 *((double *) (void *) (dbuf + idx)) = *((const double *) (const void *) (sbuf + i * extent + j1 * stride1 + k1 * extent2 + j2 * stride2 + k2 * extent3 + array_of_displs3[j3] + k3 * sizeof(double)));
112 idx += sizeof(double);
113 }
114 }
115 }
116 }
117 }
118 }
119 }
120
121 return rc;
122 }
123
yaksuri_seqi_unpack_hvector_hvector_hindexed_double(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)124 int yaksuri_seqi_unpack_hvector_hvector_hindexed_double(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
125 {
126 int rc = YAKSA_SUCCESS;
127 const char *restrict sbuf = (const char *) inbuf;
128 char *restrict dbuf = (char *) outbuf;
129 uintptr_t extent ATTRIBUTE((unused)) = type->extent;
130
131 int count1 = type->u.hvector.count;
132 int blocklength1 ATTRIBUTE((unused)) = type->u.hvector.blocklength;
133 intptr_t stride1 = type->u.hvector.stride;
134 uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
135
136 int count2 = type->u.hvector.child->u.hvector.count;
137 int blocklength2 ATTRIBUTE((unused)) = type->u.hvector.child->u.hvector.blocklength;
138 intptr_t stride2 = type->u.hvector.child->u.hvector.stride;
139 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.hvector.child->extent;
140
141 int count3 = type->u.hvector.child->u.hvector.child->u.hindexed.count;
142 int *restrict array_of_blocklengths3 = type->u.hvector.child->u.hvector.child->u.hindexed.array_of_blocklengths;
143 intptr_t *restrict array_of_displs3 = type->u.hvector.child->u.hvector.child->u.hindexed.array_of_displs;
144 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.hvector.child->u.hvector.child->extent;
145
146 uintptr_t idx = 0;
147 for (int i = 0; i < count; i++) {
148 for (int j1 = 0; j1 < count1; j1++) {
149 for (int k1 = 0; k1 < blocklength1; k1++) {
150 for (int j2 = 0; j2 < count2; j2++) {
151 for (int k2 = 0; k2 < blocklength2; k2++) {
152 for (int j3 = 0; j3 < count3; j3++) {
153 for (int k3 = 0; k3 < array_of_blocklengths3[j3]; k3++) {
154 *((double *) (void *) (dbuf + i * extent + j1 * stride1 + k1 * extent2 + j2 * stride2 + k2 * extent3 + array_of_displs3[j3] + k3 * sizeof(double))) = *((const double *) (const void *) (sbuf + idx));
155 idx += sizeof(double);
156 }
157 }
158 }
159 }
160 }
161 }
162 }
163
164 return rc;
165 }
166
yaksuri_seqi_pack_blkhindx_hvector_hindexed_double(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)167 int yaksuri_seqi_pack_blkhindx_hvector_hindexed_double(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
168 {
169 int rc = YAKSA_SUCCESS;
170 const char *restrict sbuf = (const char *) inbuf;
171 char *restrict dbuf = (char *) outbuf;
172 uintptr_t extent ATTRIBUTE((unused)) = type->extent;
173
174 int count1 = type->u.blkhindx.count;
175 int blocklength1 ATTRIBUTE((unused)) = type->u.blkhindx.blocklength;
176 intptr_t *restrict array_of_displs1 = type->u.blkhindx.array_of_displs;
177 uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
178
179 int count2 = type->u.blkhindx.child->u.hvector.count;
180 int blocklength2 ATTRIBUTE((unused)) = type->u.blkhindx.child->u.hvector.blocklength;
181 intptr_t stride2 = type->u.blkhindx.child->u.hvector.stride;
182 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.blkhindx.child->extent;
183
184 int count3 = type->u.blkhindx.child->u.hvector.child->u.hindexed.count;
185 int *restrict array_of_blocklengths3 = type->u.blkhindx.child->u.hvector.child->u.hindexed.array_of_blocklengths;
186 intptr_t *restrict array_of_displs3 = type->u.blkhindx.child->u.hvector.child->u.hindexed.array_of_displs;
187 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.blkhindx.child->u.hvector.child->extent;
188
189 uintptr_t idx = 0;
190 for (int i = 0; i < count; i++) {
191 for (int j1 = 0; j1 < count1; j1++) {
192 for (int k1 = 0; k1 < blocklength1; k1++) {
193 for (int j2 = 0; j2 < count2; j2++) {
194 for (int k2 = 0; k2 < blocklength2; k2++) {
195 for (int j3 = 0; j3 < count3; j3++) {
196 for (int k3 = 0; k3 < array_of_blocklengths3[j3]; k3++) {
197 *((double *) (void *) (dbuf + idx)) = *((const double *) (const void *) (sbuf + i * extent + array_of_displs1[j1] + k1 * extent2 + j2 * stride2 + k2 * extent3 + array_of_displs3[j3] + k3 * sizeof(double)));
198 idx += sizeof(double);
199 }
200 }
201 }
202 }
203 }
204 }
205 }
206
207 return rc;
208 }
209
yaksuri_seqi_unpack_blkhindx_hvector_hindexed_double(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)210 int yaksuri_seqi_unpack_blkhindx_hvector_hindexed_double(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
211 {
212 int rc = YAKSA_SUCCESS;
213 const char *restrict sbuf = (const char *) inbuf;
214 char *restrict dbuf = (char *) outbuf;
215 uintptr_t extent ATTRIBUTE((unused)) = type->extent;
216
217 int count1 = type->u.blkhindx.count;
218 int blocklength1 ATTRIBUTE((unused)) = type->u.blkhindx.blocklength;
219 intptr_t *restrict array_of_displs1 = type->u.blkhindx.array_of_displs;
220 uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
221
222 int count2 = type->u.blkhindx.child->u.hvector.count;
223 int blocklength2 ATTRIBUTE((unused)) = type->u.blkhindx.child->u.hvector.blocklength;
224 intptr_t stride2 = type->u.blkhindx.child->u.hvector.stride;
225 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.blkhindx.child->extent;
226
227 int count3 = type->u.blkhindx.child->u.hvector.child->u.hindexed.count;
228 int *restrict array_of_blocklengths3 = type->u.blkhindx.child->u.hvector.child->u.hindexed.array_of_blocklengths;
229 intptr_t *restrict array_of_displs3 = type->u.blkhindx.child->u.hvector.child->u.hindexed.array_of_displs;
230 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.blkhindx.child->u.hvector.child->extent;
231
232 uintptr_t idx = 0;
233 for (int i = 0; i < count; i++) {
234 for (int j1 = 0; j1 < count1; j1++) {
235 for (int k1 = 0; k1 < blocklength1; k1++) {
236 for (int j2 = 0; j2 < count2; j2++) {
237 for (int k2 = 0; k2 < blocklength2; k2++) {
238 for (int j3 = 0; j3 < count3; j3++) {
239 for (int k3 = 0; k3 < array_of_blocklengths3[j3]; k3++) {
240 *((double *) (void *) (dbuf + i * extent + array_of_displs1[j1] + k1 * extent2 + j2 * stride2 + k2 * extent3 + array_of_displs3[j3] + k3 * sizeof(double))) = *((const double *) (const void *) (sbuf + idx));
241 idx += sizeof(double);
242 }
243 }
244 }
245 }
246 }
247 }
248 }
249
250 return rc;
251 }
252
yaksuri_seqi_pack_hindexed_hvector_hindexed_double(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)253 int yaksuri_seqi_pack_hindexed_hvector_hindexed_double(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
254 {
255 int rc = YAKSA_SUCCESS;
256 const char *restrict sbuf = (const char *) inbuf;
257 char *restrict dbuf = (char *) outbuf;
258 uintptr_t extent ATTRIBUTE((unused)) = type->extent;
259
260 int count1 = type->u.hindexed.count;
261 int *restrict array_of_blocklengths1 = type->u.hindexed.array_of_blocklengths;
262 intptr_t *restrict array_of_displs1 = type->u.hindexed.array_of_displs;
263 uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
264
265 int count2 = type->u.hindexed.child->u.hvector.count;
266 int blocklength2 ATTRIBUTE((unused)) = type->u.hindexed.child->u.hvector.blocklength;
267 intptr_t stride2 = type->u.hindexed.child->u.hvector.stride;
268 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.hindexed.child->extent;
269
270 int count3 = type->u.hindexed.child->u.hvector.child->u.hindexed.count;
271 int *restrict array_of_blocklengths3 = type->u.hindexed.child->u.hvector.child->u.hindexed.array_of_blocklengths;
272 intptr_t *restrict array_of_displs3 = type->u.hindexed.child->u.hvector.child->u.hindexed.array_of_displs;
273 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.hindexed.child->u.hvector.child->extent;
274
275 uintptr_t idx = 0;
276 for (int i = 0; i < count; i++) {
277 for (int j1 = 0; j1 < count1; j1++) {
278 for (int k1 = 0; k1 < array_of_blocklengths1[j1]; k1++) {
279 for (int j2 = 0; j2 < count2; j2++) {
280 for (int k2 = 0; k2 < blocklength2; k2++) {
281 for (int j3 = 0; j3 < count3; j3++) {
282 for (int k3 = 0; k3 < array_of_blocklengths3[j3]; k3++) {
283 *((double *) (void *) (dbuf + idx)) = *((const double *) (const void *) (sbuf + i * extent + array_of_displs1[j1] + k1 * extent2 + j2 * stride2 + k2 * extent3 + array_of_displs3[j3] + k3 * sizeof(double)));
284 idx += sizeof(double);
285 }
286 }
287 }
288 }
289 }
290 }
291 }
292
293 return rc;
294 }
295
yaksuri_seqi_unpack_hindexed_hvector_hindexed_double(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)296 int yaksuri_seqi_unpack_hindexed_hvector_hindexed_double(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
297 {
298 int rc = YAKSA_SUCCESS;
299 const char *restrict sbuf = (const char *) inbuf;
300 char *restrict dbuf = (char *) outbuf;
301 uintptr_t extent ATTRIBUTE((unused)) = type->extent;
302
303 int count1 = type->u.hindexed.count;
304 int *restrict array_of_blocklengths1 = type->u.hindexed.array_of_blocklengths;
305 intptr_t *restrict array_of_displs1 = type->u.hindexed.array_of_displs;
306 uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
307
308 int count2 = type->u.hindexed.child->u.hvector.count;
309 int blocklength2 ATTRIBUTE((unused)) = type->u.hindexed.child->u.hvector.blocklength;
310 intptr_t stride2 = type->u.hindexed.child->u.hvector.stride;
311 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.hindexed.child->extent;
312
313 int count3 = type->u.hindexed.child->u.hvector.child->u.hindexed.count;
314 int *restrict array_of_blocklengths3 = type->u.hindexed.child->u.hvector.child->u.hindexed.array_of_blocklengths;
315 intptr_t *restrict array_of_displs3 = type->u.hindexed.child->u.hvector.child->u.hindexed.array_of_displs;
316 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.hindexed.child->u.hvector.child->extent;
317
318 uintptr_t idx = 0;
319 for (int i = 0; i < count; i++) {
320 for (int j1 = 0; j1 < count1; j1++) {
321 for (int k1 = 0; k1 < array_of_blocklengths1[j1]; k1++) {
322 for (int j2 = 0; j2 < count2; j2++) {
323 for (int k2 = 0; k2 < blocklength2; k2++) {
324 for (int j3 = 0; j3 < count3; j3++) {
325 for (int k3 = 0; k3 < array_of_blocklengths3[j3]; k3++) {
326 *((double *) (void *) (dbuf + i * extent + array_of_displs1[j1] + k1 * extent2 + j2 * stride2 + k2 * extent3 + array_of_displs3[j3] + k3 * sizeof(double))) = *((const double *) (const void *) (sbuf + idx));
327 idx += sizeof(double);
328 }
329 }
330 }
331 }
332 }
333 }
334 }
335
336 return rc;
337 }
338
yaksuri_seqi_pack_contig_hvector_hindexed_double(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)339 int yaksuri_seqi_pack_contig_hvector_hindexed_double(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
340 {
341 int rc = YAKSA_SUCCESS;
342 const char *restrict sbuf = (const char *) inbuf;
343 char *restrict dbuf = (char *) outbuf;
344 uintptr_t extent ATTRIBUTE((unused)) = type->extent;
345
346 int count1 = type->u.contig.count;
347 intptr_t stride1 = type->u.contig.child->extent;
348 uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
349
350 int count2 = type->u.contig.child->u.hvector.count;
351 int blocklength2 ATTRIBUTE((unused)) = type->u.contig.child->u.hvector.blocklength;
352 intptr_t stride2 = type->u.contig.child->u.hvector.stride;
353 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.contig.child->extent;
354
355 int count3 = type->u.contig.child->u.hvector.child->u.hindexed.count;
356 int *restrict array_of_blocklengths3 = type->u.contig.child->u.hvector.child->u.hindexed.array_of_blocklengths;
357 intptr_t *restrict array_of_displs3 = type->u.contig.child->u.hvector.child->u.hindexed.array_of_displs;
358 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.contig.child->u.hvector.child->extent;
359
360 uintptr_t idx = 0;
361 for (int i = 0; i < count; i++) {
362 for (int j1 = 0; j1 < count1; j1++) {
363 for (int j2 = 0; j2 < count2; j2++) {
364 for (int k2 = 0; k2 < blocklength2; k2++) {
365 for (int j3 = 0; j3 < count3; j3++) {
366 for (int k3 = 0; k3 < array_of_blocklengths3[j3]; k3++) {
367 *((double *) (void *) (dbuf + idx)) = *((const double *) (const void *) (sbuf + i * extent + j1 * stride1 + j2 * stride2 + k2 * extent3 + array_of_displs3[j3] + k3 * sizeof(double)));
368 idx += sizeof(double);
369 }
370 }
371 }
372 }
373 }
374 }
375
376 return rc;
377 }
378
yaksuri_seqi_unpack_contig_hvector_hindexed_double(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)379 int yaksuri_seqi_unpack_contig_hvector_hindexed_double(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
380 {
381 int rc = YAKSA_SUCCESS;
382 const char *restrict sbuf = (const char *) inbuf;
383 char *restrict dbuf = (char *) outbuf;
384 uintptr_t extent ATTRIBUTE((unused)) = type->extent;
385
386 int count1 = type->u.contig.count;
387 intptr_t stride1 = type->u.contig.child->extent;
388 uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
389
390 int count2 = type->u.contig.child->u.hvector.count;
391 int blocklength2 ATTRIBUTE((unused)) = type->u.contig.child->u.hvector.blocklength;
392 intptr_t stride2 = type->u.contig.child->u.hvector.stride;
393 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.contig.child->extent;
394
395 int count3 = type->u.contig.child->u.hvector.child->u.hindexed.count;
396 int *restrict array_of_blocklengths3 = type->u.contig.child->u.hvector.child->u.hindexed.array_of_blocklengths;
397 intptr_t *restrict array_of_displs3 = type->u.contig.child->u.hvector.child->u.hindexed.array_of_displs;
398 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.contig.child->u.hvector.child->extent;
399
400 uintptr_t idx = 0;
401 for (int i = 0; i < count; i++) {
402 for (int j1 = 0; j1 < count1; j1++) {
403 for (int j2 = 0; j2 < count2; j2++) {
404 for (int k2 = 0; k2 < blocklength2; k2++) {
405 for (int j3 = 0; j3 < count3; j3++) {
406 for (int k3 = 0; k3 < array_of_blocklengths3[j3]; k3++) {
407 *((double *) (void *) (dbuf + i * extent + j1 * stride1 + j2 * stride2 + k2 * extent3 + array_of_displs3[j3] + k3 * sizeof(double))) = *((const double *) (const void *) (sbuf + idx));
408 idx += sizeof(double);
409 }
410 }
411 }
412 }
413 }
414 }
415
416 return rc;
417 }
418
yaksuri_seqi_pack_resized_hvector_hindexed_double(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)419 int yaksuri_seqi_pack_resized_hvector_hindexed_double(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
420 {
421 int rc = YAKSA_SUCCESS;
422 const char *restrict sbuf = (const char *) inbuf;
423 char *restrict dbuf = (char *) outbuf;
424 uintptr_t extent ATTRIBUTE((unused)) = type->extent;
425
426 uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
427
428 int count2 = type->u.resized.child->u.hvector.count;
429 int blocklength2 ATTRIBUTE((unused)) = type->u.resized.child->u.hvector.blocklength;
430 intptr_t stride2 = type->u.resized.child->u.hvector.stride;
431 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.resized.child->extent;
432
433 int count3 = type->u.resized.child->u.hvector.child->u.hindexed.count;
434 int *restrict array_of_blocklengths3 = type->u.resized.child->u.hvector.child->u.hindexed.array_of_blocklengths;
435 intptr_t *restrict array_of_displs3 = type->u.resized.child->u.hvector.child->u.hindexed.array_of_displs;
436 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.resized.child->u.hvector.child->extent;
437
438 uintptr_t idx = 0;
439 for (int i = 0; i < count; i++) {
440 for (int j2 = 0; j2 < count2; j2++) {
441 for (int k2 = 0; k2 < blocklength2; k2++) {
442 for (int j3 = 0; j3 < count3; j3++) {
443 for (int k3 = 0; k3 < array_of_blocklengths3[j3]; k3++) {
444 *((double *) (void *) (dbuf + idx)) = *((const double *) (const void *) (sbuf + i * extent + j2 * stride2 + k2 * extent3 + array_of_displs3[j3] + k3 * sizeof(double)));
445 idx += sizeof(double);
446 }
447 }
448 }
449 }
450 }
451
452 return rc;
453 }
454
yaksuri_seqi_unpack_resized_hvector_hindexed_double(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)455 int yaksuri_seqi_unpack_resized_hvector_hindexed_double(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
456 {
457 int rc = YAKSA_SUCCESS;
458 const char *restrict sbuf = (const char *) inbuf;
459 char *restrict dbuf = (char *) outbuf;
460 uintptr_t extent ATTRIBUTE((unused)) = type->extent;
461
462 uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
463
464 int count2 = type->u.resized.child->u.hvector.count;
465 int blocklength2 ATTRIBUTE((unused)) = type->u.resized.child->u.hvector.blocklength;
466 intptr_t stride2 = type->u.resized.child->u.hvector.stride;
467 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.resized.child->extent;
468
469 int count3 = type->u.resized.child->u.hvector.child->u.hindexed.count;
470 int *restrict array_of_blocklengths3 = type->u.resized.child->u.hvector.child->u.hindexed.array_of_blocklengths;
471 intptr_t *restrict array_of_displs3 = type->u.resized.child->u.hvector.child->u.hindexed.array_of_displs;
472 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.resized.child->u.hvector.child->extent;
473
474 uintptr_t idx = 0;
475 for (int i = 0; i < count; i++) {
476 for (int j2 = 0; j2 < count2; j2++) {
477 for (int k2 = 0; k2 < blocklength2; k2++) {
478 for (int j3 = 0; j3 < count3; j3++) {
479 for (int k3 = 0; k3 < array_of_blocklengths3[j3]; k3++) {
480 *((double *) (void *) (dbuf + i * extent + j2 * stride2 + k2 * extent3 + array_of_displs3[j3] + k3 * sizeof(double))) = *((const double *) (const void *) (sbuf + idx));
481 idx += sizeof(double);
482 }
483 }
484 }
485 }
486 }
487
488 return rc;
489 }
490
491