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_resized_wchar_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)13 int yaksuri_seqi_pack_contig_resized_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 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.contig.child->extent;
25
26 uintptr_t idx = 0;
27 for (int i = 0; i < count; i++) {
28 for (int j1 = 0; j1 < count1; j1++) {
29 *((wchar_t *) (void *) (dbuf + idx)) = *((const wchar_t *) (const void *) (sbuf + i * extent + j1 * stride1));
30 idx += sizeof(wchar_t);
31 }
32 }
33
34 return rc;
35 }
36
yaksuri_seqi_unpack_contig_resized_wchar_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)37 int yaksuri_seqi_unpack_contig_resized_wchar_t(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
38 {
39 int rc = YAKSA_SUCCESS;
40 const char *restrict sbuf = (const char *) inbuf;
41 char *restrict dbuf = (char *) outbuf;
42 uintptr_t extent ATTRIBUTE((unused)) = type->extent;
43
44 int count1 = type->u.contig.count;
45 intptr_t stride1 = type->u.contig.child->extent;
46 uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
47
48 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.contig.child->extent;
49
50 uintptr_t idx = 0;
51 for (int i = 0; i < count; i++) {
52 for (int j1 = 0; j1 < count1; j1++) {
53 *((wchar_t *) (void *) (dbuf + i * extent + j1 * stride1)) = *((const wchar_t *) (const void *) (sbuf + idx));
54 idx += sizeof(wchar_t);
55 }
56 }
57
58 return rc;
59 }
60
yaksuri_seqi_pack_hvector_contig_resized_wchar_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)61 int yaksuri_seqi_pack_hvector_contig_resized_wchar_t(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
62 {
63 int rc = YAKSA_SUCCESS;
64 const char *restrict sbuf = (const char *) inbuf;
65 char *restrict dbuf = (char *) outbuf;
66 uintptr_t extent ATTRIBUTE((unused)) = type->extent;
67
68 int count1 = type->u.hvector.count;
69 int blocklength1 ATTRIBUTE((unused)) = type->u.hvector.blocklength;
70 intptr_t stride1 = type->u.hvector.stride;
71 uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
72
73 int count2 = type->u.hvector.child->u.contig.count;
74 intptr_t stride2 = type->u.hvector.child->u.contig.child->extent;
75 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.hvector.child->extent;
76
77 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.hvector.child->u.contig.child->extent;
78
79 uintptr_t idx = 0;
80 for (int i = 0; i < count; i++) {
81 for (int j1 = 0; j1 < count1; j1++) {
82 for (int k1 = 0; k1 < blocklength1; k1++) {
83 for (int j2 = 0; j2 < count2; j2++) {
84 *((wchar_t *) (void *) (dbuf + idx)) = *((const wchar_t *) (const void *) (sbuf + i * extent + j1 * stride1 + k1 * extent2 + j2 * stride2));
85 idx += sizeof(wchar_t);
86 }
87 }
88 }
89 }
90
91 return rc;
92 }
93
yaksuri_seqi_unpack_hvector_contig_resized_wchar_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)94 int yaksuri_seqi_unpack_hvector_contig_resized_wchar_t(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
95 {
96 int rc = YAKSA_SUCCESS;
97 const char *restrict sbuf = (const char *) inbuf;
98 char *restrict dbuf = (char *) outbuf;
99 uintptr_t extent ATTRIBUTE((unused)) = type->extent;
100
101 int count1 = type->u.hvector.count;
102 int blocklength1 ATTRIBUTE((unused)) = type->u.hvector.blocklength;
103 intptr_t stride1 = type->u.hvector.stride;
104 uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
105
106 int count2 = type->u.hvector.child->u.contig.count;
107 intptr_t stride2 = type->u.hvector.child->u.contig.child->extent;
108 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.hvector.child->extent;
109
110 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.hvector.child->u.contig.child->extent;
111
112 uintptr_t idx = 0;
113 for (int i = 0; i < count; i++) {
114 for (int j1 = 0; j1 < count1; j1++) {
115 for (int k1 = 0; k1 < blocklength1; k1++) {
116 for (int j2 = 0; j2 < count2; j2++) {
117 *((wchar_t *) (void *) (dbuf + i * extent + j1 * stride1 + k1 * extent2 + j2 * stride2)) = *((const wchar_t *) (const void *) (sbuf + idx));
118 idx += sizeof(wchar_t);
119 }
120 }
121 }
122 }
123
124 return rc;
125 }
126
yaksuri_seqi_pack_blkhindx_contig_resized_wchar_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)127 int yaksuri_seqi_pack_blkhindx_contig_resized_wchar_t(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
128 {
129 int rc = YAKSA_SUCCESS;
130 const char *restrict sbuf = (const char *) inbuf;
131 char *restrict dbuf = (char *) outbuf;
132 uintptr_t extent ATTRIBUTE((unused)) = type->extent;
133
134 int count1 = type->u.blkhindx.count;
135 int blocklength1 ATTRIBUTE((unused)) = type->u.blkhindx.blocklength;
136 intptr_t *restrict array_of_displs1 = type->u.blkhindx.array_of_displs;
137 uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
138
139 int count2 = type->u.blkhindx.child->u.contig.count;
140 intptr_t stride2 = type->u.blkhindx.child->u.contig.child->extent;
141 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.blkhindx.child->extent;
142
143 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.blkhindx.child->u.contig.child->extent;
144
145 uintptr_t idx = 0;
146 for (int i = 0; i < count; i++) {
147 for (int j1 = 0; j1 < count1; j1++) {
148 for (int k1 = 0; k1 < blocklength1; k1++) {
149 for (int j2 = 0; j2 < count2; j2++) {
150 *((wchar_t *) (void *) (dbuf + idx)) = *((const wchar_t *) (const void *) (sbuf + i * extent + array_of_displs1[j1] + k1 * extent2 + j2 * stride2));
151 idx += sizeof(wchar_t);
152 }
153 }
154 }
155 }
156
157 return rc;
158 }
159
yaksuri_seqi_unpack_blkhindx_contig_resized_wchar_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)160 int yaksuri_seqi_unpack_blkhindx_contig_resized_wchar_t(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
161 {
162 int rc = YAKSA_SUCCESS;
163 const char *restrict sbuf = (const char *) inbuf;
164 char *restrict dbuf = (char *) outbuf;
165 uintptr_t extent ATTRIBUTE((unused)) = type->extent;
166
167 int count1 = type->u.blkhindx.count;
168 int blocklength1 ATTRIBUTE((unused)) = type->u.blkhindx.blocklength;
169 intptr_t *restrict array_of_displs1 = type->u.blkhindx.array_of_displs;
170 uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
171
172 int count2 = type->u.blkhindx.child->u.contig.count;
173 intptr_t stride2 = type->u.blkhindx.child->u.contig.child->extent;
174 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.blkhindx.child->extent;
175
176 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.blkhindx.child->u.contig.child->extent;
177
178 uintptr_t idx = 0;
179 for (int i = 0; i < count; i++) {
180 for (int j1 = 0; j1 < count1; j1++) {
181 for (int k1 = 0; k1 < blocklength1; k1++) {
182 for (int j2 = 0; j2 < count2; j2++) {
183 *((wchar_t *) (void *) (dbuf + i * extent + array_of_displs1[j1] + k1 * extent2 + j2 * stride2)) = *((const wchar_t *) (const void *) (sbuf + idx));
184 idx += sizeof(wchar_t);
185 }
186 }
187 }
188 }
189
190 return rc;
191 }
192
yaksuri_seqi_pack_hindexed_contig_resized_wchar_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)193 int yaksuri_seqi_pack_hindexed_contig_resized_wchar_t(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
194 {
195 int rc = YAKSA_SUCCESS;
196 const char *restrict sbuf = (const char *) inbuf;
197 char *restrict dbuf = (char *) outbuf;
198 uintptr_t extent ATTRIBUTE((unused)) = type->extent;
199
200 int count1 = type->u.hindexed.count;
201 int *restrict array_of_blocklengths1 = type->u.hindexed.array_of_blocklengths;
202 intptr_t *restrict array_of_displs1 = type->u.hindexed.array_of_displs;
203 uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
204
205 int count2 = type->u.hindexed.child->u.contig.count;
206 intptr_t stride2 = type->u.hindexed.child->u.contig.child->extent;
207 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.hindexed.child->extent;
208
209 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.hindexed.child->u.contig.child->extent;
210
211 uintptr_t idx = 0;
212 for (int i = 0; i < count; i++) {
213 for (int j1 = 0; j1 < count1; j1++) {
214 for (int k1 = 0; k1 < array_of_blocklengths1[j1]; k1++) {
215 for (int j2 = 0; j2 < count2; j2++) {
216 *((wchar_t *) (void *) (dbuf + idx)) = *((const wchar_t *) (const void *) (sbuf + i * extent + array_of_displs1[j1] + k1 * extent2 + j2 * stride2));
217 idx += sizeof(wchar_t);
218 }
219 }
220 }
221 }
222
223 return rc;
224 }
225
yaksuri_seqi_unpack_hindexed_contig_resized_wchar_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)226 int yaksuri_seqi_unpack_hindexed_contig_resized_wchar_t(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
227 {
228 int rc = YAKSA_SUCCESS;
229 const char *restrict sbuf = (const char *) inbuf;
230 char *restrict dbuf = (char *) outbuf;
231 uintptr_t extent ATTRIBUTE((unused)) = type->extent;
232
233 int count1 = type->u.hindexed.count;
234 int *restrict array_of_blocklengths1 = type->u.hindexed.array_of_blocklengths;
235 intptr_t *restrict array_of_displs1 = type->u.hindexed.array_of_displs;
236 uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
237
238 int count2 = type->u.hindexed.child->u.contig.count;
239 intptr_t stride2 = type->u.hindexed.child->u.contig.child->extent;
240 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.hindexed.child->extent;
241
242 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.hindexed.child->u.contig.child->extent;
243
244 uintptr_t idx = 0;
245 for (int i = 0; i < count; i++) {
246 for (int j1 = 0; j1 < count1; j1++) {
247 for (int k1 = 0; k1 < array_of_blocklengths1[j1]; k1++) {
248 for (int j2 = 0; j2 < count2; j2++) {
249 *((wchar_t *) (void *) (dbuf + i * extent + array_of_displs1[j1] + k1 * extent2 + j2 * stride2)) = *((const wchar_t *) (const void *) (sbuf + idx));
250 idx += sizeof(wchar_t);
251 }
252 }
253 }
254 }
255
256 return rc;
257 }
258
yaksuri_seqi_pack_contig_contig_resized_wchar_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)259 int yaksuri_seqi_pack_contig_contig_resized_wchar_t(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
260 {
261 int rc = YAKSA_SUCCESS;
262 const char *restrict sbuf = (const char *) inbuf;
263 char *restrict dbuf = (char *) outbuf;
264 uintptr_t extent ATTRIBUTE((unused)) = type->extent;
265
266 int count1 = type->u.contig.count;
267 intptr_t stride1 = type->u.contig.child->extent;
268 uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
269
270 int count2 = type->u.contig.child->u.contig.count;
271 intptr_t stride2 = type->u.contig.child->u.contig.child->extent;
272 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.contig.child->extent;
273
274 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.contig.child->u.contig.child->extent;
275
276 uintptr_t idx = 0;
277 for (int i = 0; i < count; i++) {
278 for (int j1 = 0; j1 < count1; j1++) {
279 for (int j2 = 0; j2 < count2; j2++) {
280 *((wchar_t *) (void *) (dbuf + idx)) = *((const wchar_t *) (const void *) (sbuf + i * extent + j1 * stride1 + j2 * stride2));
281 idx += sizeof(wchar_t);
282 }
283 }
284 }
285
286 return rc;
287 }
288
yaksuri_seqi_unpack_contig_contig_resized_wchar_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)289 int yaksuri_seqi_unpack_contig_contig_resized_wchar_t(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
290 {
291 int rc = YAKSA_SUCCESS;
292 const char *restrict sbuf = (const char *) inbuf;
293 char *restrict dbuf = (char *) outbuf;
294 uintptr_t extent ATTRIBUTE((unused)) = type->extent;
295
296 int count1 = type->u.contig.count;
297 intptr_t stride1 = type->u.contig.child->extent;
298 uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
299
300 int count2 = type->u.contig.child->u.contig.count;
301 intptr_t stride2 = type->u.contig.child->u.contig.child->extent;
302 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.contig.child->extent;
303
304 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.contig.child->u.contig.child->extent;
305
306 uintptr_t idx = 0;
307 for (int i = 0; i < count; i++) {
308 for (int j1 = 0; j1 < count1; j1++) {
309 for (int j2 = 0; j2 < count2; j2++) {
310 *((wchar_t *) (void *) (dbuf + i * extent + j1 * stride1 + j2 * stride2)) = *((const wchar_t *) (const void *) (sbuf + idx));
311 idx += sizeof(wchar_t);
312 }
313 }
314 }
315
316 return rc;
317 }
318
yaksuri_seqi_pack_resized_contig_resized_wchar_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)319 int yaksuri_seqi_pack_resized_contig_resized_wchar_t(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
320 {
321 int rc = YAKSA_SUCCESS;
322 const char *restrict sbuf = (const char *) inbuf;
323 char *restrict dbuf = (char *) outbuf;
324 uintptr_t extent ATTRIBUTE((unused)) = type->extent;
325
326 uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
327
328 int count2 = type->u.resized.child->u.contig.count;
329 intptr_t stride2 = type->u.resized.child->u.contig.child->extent;
330 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.resized.child->extent;
331
332 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.resized.child->u.contig.child->extent;
333
334 uintptr_t idx = 0;
335 for (int i = 0; i < count; i++) {
336 for (int j2 = 0; j2 < count2; j2++) {
337 *((wchar_t *) (void *) (dbuf + idx)) = *((const wchar_t *) (const void *) (sbuf + i * extent + j2 * stride2));
338 idx += sizeof(wchar_t);
339 }
340 }
341
342 return rc;
343 }
344
yaksuri_seqi_unpack_resized_contig_resized_wchar_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)345 int yaksuri_seqi_unpack_resized_contig_resized_wchar_t(const void *inbuf, void *outbuf, uintptr_t count, yaksi_type_s * type)
346 {
347 int rc = YAKSA_SUCCESS;
348 const char *restrict sbuf = (const char *) inbuf;
349 char *restrict dbuf = (char *) outbuf;
350 uintptr_t extent ATTRIBUTE((unused)) = type->extent;
351
352 uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
353
354 int count2 = type->u.resized.child->u.contig.count;
355 intptr_t stride2 = type->u.resized.child->u.contig.child->extent;
356 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.resized.child->extent;
357
358 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.resized.child->u.contig.child->extent;
359
360 uintptr_t idx = 0;
361 for (int i = 0; i < count; i++) {
362 for (int j2 = 0; j2 < count2; j2++) {
363 *((wchar_t *) (void *) (dbuf + i * extent + j2 * stride2)) = *((const wchar_t *) (const void *) (sbuf + idx));
364 idx += sizeof(wchar_t);
365 }
366 }
367
368 return rc;
369 }
370
371