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