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 <stdio.h> 9 #include <stdlib.h> 10 #include <wchar.h> 11 #include "yaksi.h" 12 #include "yaksu.h" 13 #include "yaksuri_cudai.h" 14 #include "yaksuri_cudai_populate_pupfns.h" 15 #include "yaksuri_cudai_pup.h" 16 yaksuri_cudai_populate_pupfns_hvector_builtin(yaksi_type_s * type)17int yaksuri_cudai_populate_pupfns_hvector_builtin(yaksi_type_s * type) 18 { 19 int rc = YAKSA_SUCCESS; 20 yaksuri_cudai_type_s *cuda = (yaksuri_cudai_type_s *) type->backend.cuda.priv; 21 22 char *str = getenv("YAKSA_ENV_MAX_NESTING_LEVEL"); 23 int max_nesting_level; 24 if (str) { 25 max_nesting_level = atoi(str); 26 } else { 27 max_nesting_level = YAKSI_ENV_DEFAULT_NESTING_LEVEL; 28 } 29 30 switch (type->u.hvector.child->u.builtin.handle) { 31 case YAKSA_TYPE___BOOL: 32 if (max_nesting_level >= 1) { 33 cuda->pack = yaksuri_cudai_pack_hvector__Bool; 34 cuda->unpack = yaksuri_cudai_unpack_hvector__Bool; 35 } 36 break; 37 case YAKSA_TYPE__CHAR: 38 if (max_nesting_level >= 1) { 39 cuda->pack = yaksuri_cudai_pack_hvector_char; 40 cuda->unpack = yaksuri_cudai_unpack_hvector_char; 41 } 42 break; 43 case YAKSA_TYPE__WCHAR_T: 44 if (max_nesting_level >= 1) { 45 cuda->pack = yaksuri_cudai_pack_hvector_wchar_t; 46 cuda->unpack = yaksuri_cudai_unpack_hvector_wchar_t; 47 } 48 break; 49 case YAKSA_TYPE__INT8_T: 50 if (max_nesting_level >= 1) { 51 cuda->pack = yaksuri_cudai_pack_hvector_int8_t; 52 cuda->unpack = yaksuri_cudai_unpack_hvector_int8_t; 53 } 54 break; 55 case YAKSA_TYPE__INT16_T: 56 if (max_nesting_level >= 1) { 57 cuda->pack = yaksuri_cudai_pack_hvector_int16_t; 58 cuda->unpack = yaksuri_cudai_unpack_hvector_int16_t; 59 } 60 break; 61 case YAKSA_TYPE__INT32_T: 62 if (max_nesting_level >= 1) { 63 cuda->pack = yaksuri_cudai_pack_hvector_int32_t; 64 cuda->unpack = yaksuri_cudai_unpack_hvector_int32_t; 65 } 66 break; 67 case YAKSA_TYPE__INT64_T: 68 if (max_nesting_level >= 1) { 69 cuda->pack = yaksuri_cudai_pack_hvector_int64_t; 70 cuda->unpack = yaksuri_cudai_unpack_hvector_int64_t; 71 } 72 break; 73 case YAKSA_TYPE__FLOAT: 74 if (max_nesting_level >= 1) { 75 cuda->pack = yaksuri_cudai_pack_hvector_float; 76 cuda->unpack = yaksuri_cudai_unpack_hvector_float; 77 } 78 break; 79 case YAKSA_TYPE__DOUBLE: 80 if (max_nesting_level >= 1) { 81 cuda->pack = yaksuri_cudai_pack_hvector_double; 82 cuda->unpack = yaksuri_cudai_unpack_hvector_double; 83 } 84 break; 85 case YAKSA_TYPE__LONG_DOUBLE: 86 if (max_nesting_level >= 1) { 87 cuda->pack = yaksuri_cudai_pack_hvector_double; 88 cuda->unpack = yaksuri_cudai_unpack_hvector_double; 89 } 90 break; 91 default: 92 break; 93 } 94 95 return rc; 96 } 97