00001
00010 #ifndef _GK_STRUCT_H_
00011 #define _GK_STRUCT_H_
00012
00013
00014
00016
00017 #define GK_MKKEYVALUE_T(NAME, KEYTYPE, VALTYPE) \
00018 typedef struct {\
00019 KEYTYPE key;\
00020 VALTYPE val;\
00021 } NAME;\
00022
00023
00024 GK_MKKEYVALUE_T(gk_ckv_t, char, ssize_t)
00025 GK_MKKEYVALUE_T(gk_ikv_t, int, ssize_t)
00026 GK_MKKEYVALUE_T(gk_i32kv_t, int32_t, ssize_t)
00027 GK_MKKEYVALUE_T(gk_i64kv_t, int64_t, ssize_t)
00028 GK_MKKEYVALUE_T(gk_zkv_t, ssize_t, ssize_t)
00029 GK_MKKEYVALUE_T(gk_fkv_t, float, ssize_t)
00030 GK_MKKEYVALUE_T(gk_dkv_t, double, ssize_t)
00031 GK_MKKEYVALUE_T(gk_skv_t, char *, ssize_t)
00032 GK_MKKEYVALUE_T(gk_idxkv_t, gk_idx_t, gk_idx_t)
00033
00034
00035
00036
00038
00039 #define GK_MKPQUEUE_T(NAME, KVTYPE)\
00040 typedef struct {\
00041 gk_idx_t nnodes;\
00042 gk_idx_t maxnodes;\
00043 \
00044 \
00045 KVTYPE *heap;\
00046 gk_idx_t *locator;\
00047 } NAME;\
00048
00049 GK_MKPQUEUE_T(gk_ipq_t, gk_ikv_t)
00050 GK_MKPQUEUE_T(gk_i32pq_t, gk_i32kv_t)
00051 GK_MKPQUEUE_T(gk_i64pq_t, gk_i64kv_t)
00052 GK_MKPQUEUE_T(gk_fpq_t, gk_fkv_t)
00053 GK_MKPQUEUE_T(gk_dpq_t, gk_dkv_t)
00054 GK_MKPQUEUE_T(gk_idxpq_t, gk_idxkv_t)
00055
00056
00057 #define GK_MKPQUEUE2_T(NAME, KTYPE, VTYPE)\
00058 typedef struct {\
00059 ssize_t nnodes;\
00060 ssize_t maxnodes;\
00061 \
00062 \
00063 KTYPE *keys;\
00064 VTYPE *vals;\
00065 } NAME;\
00066
00067
00068
00069
00070
00071
00072 typedef struct gk_csr_t {
00073 int32_t nrows, ncols;
00074 ssize_t *rowptr, *colptr;
00075 int32_t *rowind, *colind;
00076 int32_t *rowids, *colids;
00077 float *rowval, *colval;
00078 float *rnorms, *cnorms;
00079 float *rsums, *csums;
00080 float *rsizes, *csizes;
00081 float *rvols, *cvols;
00082 float *rwgts, *cwgts;
00083 } gk_csr_t;
00084
00085
00086
00087
00088
00089 typedef struct gk_graph_t {
00090 int32_t nvtxs;
00091 ssize_t *xadj;
00092 int32_t *adjncy;
00093 int32_t *iadjwgt;
00094 float *fadjwgt;
00095 int32_t *ivwgts;
00096 float *fvwgts;
00097 int32_t *ivsizes;
00098 float *fvsizes;
00099 int32_t *vlabels;
00100 } gk_graph_t;
00101
00102
00103
00104
00105
00106
00107 typedef struct gk_str_t {
00108 size_t len;
00109 char *buf;
00110 } gk_str_t;
00111
00112
00113
00114
00115
00116
00117
00118
00119 typedef struct gk_StringMap_t {
00120 char *name;
00121 int id;
00122 } gk_StringMap_t;
00123
00124
00125
00126
00127
00128 typedef struct gk_HTable_t {
00129 int nelements;
00130 int htsize;
00131 gk_ikv_t *harray;
00132 } gk_HTable_t;
00133
00134
00135
00136
00137
00138
00139 typedef struct gk_Tokens_t {
00140 int ntoks;
00141 char *strbuf;
00142 char **list;
00143 } gk_Tokens_t;
00144
00145
00146
00147
00148 typedef struct atom {
00149 int serial;
00150 char *name;
00151 char altLoc;
00152 char *resname;
00153 char chainid;
00154 int rserial;
00155 char icode;
00156 char element;
00157 double x;
00158 double y;
00159 double z;
00160 double opcy;
00161 double tmpt;
00162 } atom;
00163
00164
00165
00166
00167
00168
00169 typedef struct center_of_mass {
00170 char name;
00171 double x;
00172 double y;
00173 double z;
00174 } center_of_mass;
00175
00176
00177
00178
00179
00180 typedef struct pdbf {
00181 int natoms;
00182 int nresidues;
00183 int ncas;
00184 int nbbs;
00185 int corruption;
00186 char *resSeq;
00187 char **threeresSeq;
00188 atom *atoms;
00189 atom **bbs;
00190 atom **cas;
00191 center_of_mass *cm;
00192 } pdbf;
00193
00194
00195
00196
00197
00198
00199 typedef struct gk_i2cc2i_t {
00200 int n;
00201 char *i2c;
00202 int *c2i;
00203 } gk_i2cc2i_t;
00204
00205
00206
00207
00208
00209 typedef struct gk_seq_t {
00210
00211 int len;
00212 int *sequence;
00213
00214
00215 int **pssm;
00216 int **psfm;
00217 char *name;
00218
00219 int nsymbols;
00220
00221
00222 } gk_seq_t;
00223
00224
00225
00226
00227
00231
00232 typedef struct gk_mop_t {
00233 int type;
00234 ssize_t nbytes;
00235 void *ptr;
00236 } gk_mop_t;
00237
00238
00239
00241
00242 typedef struct gk_mcore_t {
00243
00244 size_t coresize;
00245 size_t corecpos;
00246 void *core;
00248
00249
00250 size_t nmops;
00251 size_t cmop;
00252 gk_mop_t *mops;
00254
00255 size_t num_callocs;
00256 size_t num_hallocs;
00257 size_t size_callocs;
00258 size_t size_hallocs;
00259 size_t cur_callocs;
00260 size_t cur_hallocs;
00261 size_t max_callocs;
00262 size_t max_hallocs;
00264 } gk_mcore_t;
00265
00266
00267
00268 #endif