00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058 #ifndef CWH_TYPES_INCLUDED
00059 #define CWH_TYPES_INCLUDED
00060
00061 #ifdef KEY
00062
00063
00064
00065
00066
00067
00068
00069 typedef enum {
00070 DV_BASE_IDX = 0,
00071 DV_EL_LEN_IDX = 1,
00072 DV_ASSOC_IDX = 2,
00073 DV_PTR_ALLOC_IDX = 3,
00074 DV_P_OR_A_IDX = 4,
00075 DV_A_CONTIG_IDX = 5,
00076 DV_ALLOCCPNT_IDX = 6,
00077 DV_UNUSED_1_IDX = 7,
00078 DV_NUM_DIMS_IDX = 8,
00079 DV_TYPE_CODE_IDX = 9,
00080 DV_ORIG_BASE_IDX = 10,
00081 DV_ORIG_SIZE_IDX = 11
00082 } dv_idx_type;
00083 # ifdef __cplusplus
00084 extern "C" {
00085 # endif
00086 void fei_set_dv_hdr_fld(dv_idx_type);
00087 void fei_get_dv_hdr_fld(dv_idx_type);
00088 # ifdef __cplusplus
00089 }
00090 # endif
00091 #endif
00092
00093
00094
00095 #ifndef FOR_I_CVRT
00096
00097 #ifdef _KEEP_RCS_ID
00098 static char *rcs_id = "$Source$ $Revision$";
00099 #endif
00100
00101 enum ty_bound_enum {
00102 LOW,
00103 UPPER,
00104 STRIDE
00105 };
00106
00107 extern TY_IDX cwh_types_mk_procedure_TY (TY_IDX ret_typ,INT32 nparms, BOOL global, BOOL host) ;
00108
00109 extern TY_IDX cwh_types_scalar_TY(TY_IDX ty) ;
00110 extern TY_IDX cwh_types_array_TY(TY_IDX ty) ;
00111 extern TY_IDX cwh_types_WN_TY(WN * wn, BOOL addr) ;
00112 extern TY_IDX cwh_types_dope_TY(INT32 num_dims,TY_IDX base, BOOL host, BOOL ptr,
00113 #ifdef KEY
00114 INT32 num_allocatable_cpnt
00115 #endif
00116 );
00117
00118 extern TY_IDX cwh_types_ch_parm_TY(WN *ln) ;
00119 extern ST * cwh_types_character_extra(ST *dummy) ;
00120 extern BOOL cwh_types_is_character(TY_IDX ty) ;
00121 extern BOOL cwh_types_is_logical(TY_IDX ty) ;
00122 extern BOOL cwh_types_is_character_function(TY_IDX ty) ;
00123
00124 extern TY_IDX cwh_types_mk_common_TY(INT64 size, mUINT16 al);
00125 extern void cwh_types_mk_element(ST *c, ST * st);
00126 extern TY_IDX cwh_types_mk_namelist_TY(INT32 nitems) ;
00127
00128 extern FLD_HANDLE cwh_types_fld_dummy(INT64 off,TY_IDX ty) ;
00129 extern void cwh_types_get_dope_info(
00130 #ifdef KEY
00131 dv_idx_type crayfield,
00132 #else
00133 INT32 crayfield,
00134 #endif
00135 INT32 *offset, INT32 *rshift, INT64 *mask, TYPE_ID *ty);
00136 extern INT32 cwh_types_dope_rank(TY_IDX ty);
00137 extern TY_IDX cwh_types_dope_basic_TY(TY_IDX ty);
00138
00139 extern WN * cwh_types_size_WN(TY_IDX, WN *e_sz) ;
00140 extern TY_IDX cwh_types_array_temp_TY(WN *ar, TY_IDX sc) ;
00141 extern WN * cwh_types_bound_WN(TY_IDX ty, INT16 i, enum ty_bound_enum b) ;
00142
00143 extern INT64 cwh_cray_type_from_TY(TY_IDX ty);
00144 extern INT64 cwh_cray_type_from_MTYPE(TYPE_ID ty);
00145 extern BOOL cwh_types_is_dope(TY_IDX ty) ;
00146 extern FLD_HANDLE cwh_types_dope_dims_FLD(TY_IDX ty);
00147
00148 extern char * cwh_types_mk_anon_name (const char * p) ;
00149 extern TY_IDX cwh_types_array_util(INT16 rank, TY_IDX ta, INT32 align, INT64 size, const char *name,
00150 BOOL alloc_arbs);
00151
00152 extern void cwh_types_init_target(void);
00153 extern TY_IDX cwh_types_mk_pointer_TY(TY_IDX ty, BOOL host) ;
00154 extern TY_IDX cwh_types_mk_f90_pointer_ty (TY_IDX ty);
00155 extern TY_IDX cwh_types_mk_logical_TY(INT32 sz, mUINT16 align) ;
00156 extern TY_IDX cwh_types_form_misaligned_TY(TY_IDX ty,mUINT16 align) ;
00157 extern TY_IDX cwh_types_make_pointer_type(TY_IDX ty, BOOL f90_pointer);
00158 extern TY_IDX cwh_types_enter_TY(TY_IDX can) ;
00159 extern TY_IDX cwh_types_mk_equiv_TY(INT64 size);
00160 extern TY_IDX cwh_types_mk_character_TY (WN * sz, ST *st, BOOL is_wn);
00161 extern TY_IDX cwh_types_unique_TY(TY_IDX ty_idx);
00162 extern void cwh_types_enter_common_element(ST *c, ST * st);
00163 extern TY_IDX cwh_types_mk_result_temp_TY(void) ;
00164 extern void cwh_types_copyin_pragma(ST *st) ;
00165 extern bool cwh_types_contains_dope(TY_IDX ty) ;
00166
00167
00168
00169
00170 #define t_TY(x) (x.table_index)
00171
00172
00173
00174 extern INT32 DOPE_bound_sz;
00175 extern INT32 DOPE_dim_offset;
00176 extern INT32 DOPE_sz;
00177
00178 #ifdef KEY
00179 #define DOPE_NM 12
00180 #else
00181 #define DOPE_NM 11
00182 #endif
00183 #define DOPE_USED DOPE_NM-1
00184 #define BOUND_NM 3
00185 #define DIM_SZ BOUND_NM*DOPE_bound_sz
00186 #define ADDR_OFFSET 0
00187 #define ADDR_TYPEID Pointer_Mtype
00188
00189 #define IS_TYLIST
00190
00191 extern TY_IDX DOPE_bound_ty ;
00192
00193
00194 extern WN *decl_distribute_pragmas;
00195
00196
00197 extern TY_IDX logical4_ty;
00198
00199 #ifdef __cplusplus
00200 extern "C" {
00201 #endif
00202
00203 typedef struct dope_header1 {
00204 unsigned int assoc :1;
00205 unsigned int ptr_alloc :1;
00206 unsigned int p_or_a :2;
00207
00208 unsigned int a_contig :1;
00209 #ifdef KEY
00210 unsigned int alloc_cpnt:1;
00211
00212
00213 unsigned int unused :26;
00214 #else
00215 unsigned int unused :27;
00216 #endif
00217 } dope_header1_type;
00218
00219 typedef struct dope_header2 {
00220 unsigned int unused :29;
00221 unsigned int n_dim :3;
00222 } dope_header2_type;
00223
00224 typedef struct f90_type {
00225
00226 unsigned int :32;
00227 unsigned int type :8;
00228 unsigned int dpflag :1;
00229
00230 unsigned int kind_or_star :3;
00231
00232
00233 unsigned int int_len :12;
00234
00235
00236 unsigned int dec_len :8;
00237
00238
00239 } f90_type_t;
00240
00241 #ifdef __cplusplus
00242 }
00243 #endif
00244
00245 #endif
00246
00247 #endif
00248