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_contig_int8_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)13 int yaksuri_seqi_pack_resized_contig_int8_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.contig.count;
23 intptr_t stride2 = type->u.resized.child->u.contig.child->extent;
24 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.resized.child->extent;
25
26 uintptr_t idx = 0;
27 for (int i = 0; i < count; i++) {
28 for (int j2 = 0; j2 < count2; j2++) {
29 *((int8_t *) (void *) (dbuf + idx)) = *((const int8_t *) (const void *) (sbuf + i * extent + j2 * stride2));
30 idx += sizeof(int8_t);
31 }
32 }
33
34 return rc;
35 }
36
yaksuri_seqi_unpack_resized_contig_int8_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)37 int yaksuri_seqi_unpack_resized_contig_int8_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 uintptr_t extent1 ATTRIBUTE((unused)) = type->extent;
45
46 int count2 = type->u.resized.child->u.contig.count;
47 intptr_t stride2 = type->u.resized.child->u.contig.child->extent;
48 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.resized.child->extent;
49
50 uintptr_t idx = 0;
51 for (int i = 0; i < count; i++) {
52 for (int j2 = 0; j2 < count2; j2++) {
53 *((int8_t *) (void *) (dbuf + i * extent + j2 * stride2)) = *((const int8_t *) (const void *) (sbuf + idx));
54 idx += sizeof(int8_t);
55 }
56 }
57
58 return rc;
59 }
60
yaksuri_seqi_pack_hvector_resized_contig_int8_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)61 int yaksuri_seqi_pack_hvector_resized_contig_int8_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 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.hvector.child->extent;
74
75 int count3 = type->u.hvector.child->u.resized.child->u.contig.count;
76 intptr_t stride3 = type->u.hvector.child->u.resized.child->u.contig.child->extent;
77 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.hvector.child->u.resized.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 j3 = 0; j3 < count3; j3++) {
84 *((int8_t *) (void *) (dbuf + idx)) = *((const int8_t *) (const void *) (sbuf + i * extent + j1 * stride1 + k1 * extent2 + j3 * stride3));
85 idx += sizeof(int8_t);
86 }
87 }
88 }
89 }
90
91 return rc;
92 }
93
yaksuri_seqi_unpack_hvector_resized_contig_int8_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)94 int yaksuri_seqi_unpack_hvector_resized_contig_int8_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 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.hvector.child->extent;
107
108 int count3 = type->u.hvector.child->u.resized.child->u.contig.count;
109 intptr_t stride3 = type->u.hvector.child->u.resized.child->u.contig.child->extent;
110 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.hvector.child->u.resized.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 j3 = 0; j3 < count3; j3++) {
117 *((int8_t *) (void *) (dbuf + i * extent + j1 * stride1 + k1 * extent2 + j3 * stride3)) = *((const int8_t *) (const void *) (sbuf + idx));
118 idx += sizeof(int8_t);
119 }
120 }
121 }
122 }
123
124 return rc;
125 }
126
yaksuri_seqi_pack_blkhindx_resized_contig_int8_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)127 int yaksuri_seqi_pack_blkhindx_resized_contig_int8_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 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.blkhindx.child->extent;
140
141 int count3 = type->u.blkhindx.child->u.resized.child->u.contig.count;
142 intptr_t stride3 = type->u.blkhindx.child->u.resized.child->u.contig.child->extent;
143 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.blkhindx.child->u.resized.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 j3 = 0; j3 < count3; j3++) {
150 *((int8_t *) (void *) (dbuf + idx)) = *((const int8_t *) (const void *) (sbuf + i * extent + array_of_displs1[j1] + k1 * extent2 + j3 * stride3));
151 idx += sizeof(int8_t);
152 }
153 }
154 }
155 }
156
157 return rc;
158 }
159
yaksuri_seqi_unpack_blkhindx_resized_contig_int8_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)160 int yaksuri_seqi_unpack_blkhindx_resized_contig_int8_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 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.blkhindx.child->extent;
173
174 int count3 = type->u.blkhindx.child->u.resized.child->u.contig.count;
175 intptr_t stride3 = type->u.blkhindx.child->u.resized.child->u.contig.child->extent;
176 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.blkhindx.child->u.resized.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 j3 = 0; j3 < count3; j3++) {
183 *((int8_t *) (void *) (dbuf + i * extent + array_of_displs1[j1] + k1 * extent2 + j3 * stride3)) = *((const int8_t *) (const void *) (sbuf + idx));
184 idx += sizeof(int8_t);
185 }
186 }
187 }
188 }
189
190 return rc;
191 }
192
yaksuri_seqi_pack_hindexed_resized_contig_int8_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)193 int yaksuri_seqi_pack_hindexed_resized_contig_int8_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 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.hindexed.child->extent;
206
207 int count3 = type->u.hindexed.child->u.resized.child->u.contig.count;
208 intptr_t stride3 = type->u.hindexed.child->u.resized.child->u.contig.child->extent;
209 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.hindexed.child->u.resized.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 j3 = 0; j3 < count3; j3++) {
216 *((int8_t *) (void *) (dbuf + idx)) = *((const int8_t *) (const void *) (sbuf + i * extent + array_of_displs1[j1] + k1 * extent2 + j3 * stride3));
217 idx += sizeof(int8_t);
218 }
219 }
220 }
221 }
222
223 return rc;
224 }
225
yaksuri_seqi_unpack_hindexed_resized_contig_int8_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)226 int yaksuri_seqi_unpack_hindexed_resized_contig_int8_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 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.hindexed.child->extent;
239
240 int count3 = type->u.hindexed.child->u.resized.child->u.contig.count;
241 intptr_t stride3 = type->u.hindexed.child->u.resized.child->u.contig.child->extent;
242 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.hindexed.child->u.resized.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 j3 = 0; j3 < count3; j3++) {
249 *((int8_t *) (void *) (dbuf + i * extent + array_of_displs1[j1] + k1 * extent2 + j3 * stride3)) = *((const int8_t *) (const void *) (sbuf + idx));
250 idx += sizeof(int8_t);
251 }
252 }
253 }
254 }
255
256 return rc;
257 }
258
yaksuri_seqi_pack_contig_resized_contig_int8_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)259 int yaksuri_seqi_pack_contig_resized_contig_int8_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 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.contig.child->extent;
271
272 int count3 = type->u.contig.child->u.resized.child->u.contig.count;
273 intptr_t stride3 = type->u.contig.child->u.resized.child->u.contig.child->extent;
274 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.contig.child->u.resized.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 j3 = 0; j3 < count3; j3++) {
280 *((int8_t *) (void *) (dbuf + idx)) = *((const int8_t *) (const void *) (sbuf + i * extent + j1 * stride1 + j3 * stride3));
281 idx += sizeof(int8_t);
282 }
283 }
284 }
285
286 return rc;
287 }
288
yaksuri_seqi_unpack_contig_resized_contig_int8_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)289 int yaksuri_seqi_unpack_contig_resized_contig_int8_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 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.contig.child->extent;
301
302 int count3 = type->u.contig.child->u.resized.child->u.contig.count;
303 intptr_t stride3 = type->u.contig.child->u.resized.child->u.contig.child->extent;
304 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.contig.child->u.resized.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 j3 = 0; j3 < count3; j3++) {
310 *((int8_t *) (void *) (dbuf + i * extent + j1 * stride1 + j3 * stride3)) = *((const int8_t *) (const void *) (sbuf + idx));
311 idx += sizeof(int8_t);
312 }
313 }
314 }
315
316 return rc;
317 }
318
yaksuri_seqi_pack_resized_resized_contig_int8_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)319 int yaksuri_seqi_pack_resized_resized_contig_int8_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 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.resized.child->extent;
329
330 int count3 = type->u.resized.child->u.resized.child->u.contig.count;
331 intptr_t stride3 = type->u.resized.child->u.resized.child->u.contig.child->extent;
332 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.resized.child->u.resized.child->extent;
333
334 uintptr_t idx = 0;
335 for (int i = 0; i < count; i++) {
336 for (int j3 = 0; j3 < count3; j3++) {
337 *((int8_t *) (void *) (dbuf + idx)) = *((const int8_t *) (const void *) (sbuf + i * extent + j3 * stride3));
338 idx += sizeof(int8_t);
339 }
340 }
341
342 return rc;
343 }
344
yaksuri_seqi_unpack_resized_resized_contig_int8_t(const void * inbuf,void * outbuf,uintptr_t count,yaksi_type_s * type)345 int yaksuri_seqi_unpack_resized_resized_contig_int8_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 uintptr_t extent2 ATTRIBUTE((unused)) = type->u.resized.child->extent;
355
356 int count3 = type->u.resized.child->u.resized.child->u.contig.count;
357 intptr_t stride3 = type->u.resized.child->u.resized.child->u.contig.child->extent;
358 uintptr_t extent3 ATTRIBUTE((unused)) = type->u.resized.child->u.resized.child->extent;
359
360 uintptr_t idx = 0;
361 for (int i = 0; i < count; i++) {
362 for (int j3 = 0; j3 < count3; j3++) {
363 *((int8_t *) (void *) (dbuf + i * extent + j3 * stride3)) = *((const int8_t *) (const void *) (sbuf + idx));
364 idx += sizeof(int8_t);
365 }
366 }
367
368 return rc;
369 }
370
371