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