Go to the documentation of this file.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 #ifndef CWH_TYPES_INCLUDED
00050 #define CWH_TYPES_INCLUDED
00051
00052 #ifdef _KEEP_RCS_ID
00053 #endif
00054
00055 enum ty_bound_enum {
00056 LOW,
00057 UPPER,
00058 STRIDE
00059 };
00060
00061 extern TY_IDX cwh_types_mk_procedure_TY (TY_IDX ret_typ,INT32 nparms, BOOL global, BOOL host) ;
00062
00063 extern TY_IDX cwh_types_scalar_TY(TY_IDX ty) ;
00064 extern TY_IDX cwh_types_array_TY(TY_IDX ty) ;
00065 extern TY_IDX cwh_types_WN_TY(WN * wn, BOOL addr) ;
00066 extern TY_IDX cwh_types_dope_TY(INT32 num_dims,TY_IDX base, BOOL host, BOOL ptr);
00067
00068 extern TY_IDX cwh_types_ch_parm_TY(WN *ln) ;
00069 extern ST * cwh_types_character_extra(ST *dummy) ;
00070 extern BOOL cwh_types_is_character(TY_IDX ty) ;
00071 extern BOOL cwh_types_is_logical(TY_IDX ty) ;
00072 extern BOOL cwh_types_is_character_function(TY_IDX ty) ;
00073
00074 extern TY_IDX cwh_types_mk_common_TY(INT64 size, mUINT16 al);
00075 extern TY_IDX cwh_types_mk_module_TY(INT64 size, mUINT16 al);
00076
00077 extern void cwh_types_mk_element(ST *c, ST * st);
00078 extern TY_IDX cwh_types_mk_namelist_TY(INT32 nitems) ;
00079
00080 extern FLD_HANDLE cwh_types_fld_dummy(INT64 off,TY_IDX ty) ;
00081 extern void cwh_types_get_dope_info(INT32 crayfield, INT32 *offset, INT32 *rshift,
00082 INT64 *mask, TYPE_ID *ty);
00083 extern INT32 cwh_types_dope_rank(TY_IDX ty);
00084 extern TY_IDX cwh_types_dope_basic_TY(TY_IDX ty);
00085
00086 extern WN * cwh_types_size_WN(TY_IDX, WN *e_sz) ;
00087 extern TY_IDX cwh_types_array_temp_TY(WN *ar, TY_IDX sc) ;
00088 extern WN * cwh_types_bound_WN(TY_IDX ty, INT16 i, enum ty_bound_enum b) ;
00089
00090 extern INT64 cwh_cray_type_from_TY(TY_IDX ty);
00091 extern INT64 cwh_cray_type_from_MTYPE(TYPE_ID ty);
00092 extern BOOL cwh_types_is_dope(TY_IDX ty) ;
00093 extern FLD_HANDLE cwh_types_dope_dims_FLD(TY_IDX ty);
00094
00095 extern char * cwh_types_mk_anon_name (char * p) ;
00096 extern TY_IDX cwh_types_array_util(INT16 rank, TY_IDX ta, INT32 align, INT64 size,char *name,
00097 BOOL alloc_arbs);
00098
00099 extern void cwh_types_init_target(void);
00100 extern TY_IDX cwh_types_mk_pointer_TY(TY_IDX ty, BOOL host) ;
00101 extern TY_IDX cwh_types_mk_f90_pointer_ty (TY_IDX ty);
00102 extern TY_IDX cwh_types_mk_logical_TY(INT32 sz, mUINT16 align) ;
00103 extern TY_IDX cwh_types_form_misaligned_TY(TY_IDX ty,mUINT16 align) ;
00104 extern TY_IDX cwh_types_make_pointer_type(TY_IDX ty, BOOL f90_pointer);
00105 extern TY_IDX cwh_types_enter_TY(TY_IDX can) ;
00106 extern TY_IDX cwh_types_mk_equiv_TY(INT64 size);
00107 extern TY_IDX cwh_types_mk_character_TY (WN * sz, ST *st, BOOL is_wn);
00108 extern TY_IDX cwh_types_unique_TY(TY_IDX ty_idx);
00109 extern void cwh_types_enter_common_element(ST *c, ST * st);
00110 extern TY_IDX cwh_types_mk_result_temp_TY(void) ;
00111 extern void cwh_types_copyin_pragma(ST *st) ;
00112 extern bool cwh_types_contains_dope(TY_IDX ty) ;
00113
00114
00115
00116
00117 #define t_TY(x) (x.table_index)
00118
00119
00120
00121 extern INT32 DOPE_bound_sz;
00122 extern INT32 DOPE_dim_offset;
00123 extern INT32 DOPE_sz;
00124
00125 #define DOPE_NM 11
00126 #define DOPE_USED DOPE_NM-1
00127 #define BOUND_NM 3
00128 #define DIM_SZ BOUND_NM*DOPE_bound_sz
00129 #define ADDR_OFFSET 0
00130 #define ADDR_TYPEID Pointer_Mtype
00131
00132 #define IS_TYLIST
00133
00134 extern TY_IDX DOPE_bound_ty ;
00135
00136
00137 extern WN *decl_distribute_pragmas;
00138
00139
00140 extern TY_IDX logical4_ty;
00141
00142 #ifdef __cplusplus
00143 extern "C" {
00144 #endif
00145
00146 typedef struct dope_header1 {
00147 unsigned int assoc :1;
00148 unsigned int ptr_alloc :1;
00149 unsigned int p_or_a :2;
00150
00151 unsigned int a_contig :1;
00152 unsigned int unused :27;
00153 } dope_header1_type;
00154
00155 typedef struct dope_header2 {
00156 unsigned int unused :29;
00157 unsigned int n_dim :3;
00158 } dope_header2_type;
00159
00160 typedef struct f90_type {
00161
00162 unsigned int :32;
00163 unsigned int type :8;
00164 unsigned int dpflag :1;
00165
00166 unsigned int kind_or_star :3;
00167
00168
00169 unsigned int int_len :12;
00170
00171
00172 unsigned int dec_len :8;
00173
00174
00175 } f90_type_t;
00176
00177 #ifdef __cplusplus
00178 }
00179 #endif
00180
00181 #endif
00182