/* Be careful to only edit the *.tmpl file. [-*-C-*- source] */ #ifndef _tv_setup_ #define _tv_setup_ #include #include /* Why 23? - Trade-off between array operations and tree operations. - 23 slots gives .86 bytes per element average overhead & 23 is a prime number - Benchmarks showed 17..30 were pretty good. */ #define TnWIDTH 23 #ifndef TV_TEST // #define TV_TEST #endif #define NEW_TN(ret, near)\ NEW_OS_OBJECT(ret, os_segment::of(near), TN::get_os_typespec(), TN) // ret = new(os_segment::of(near), TN::get_os_typespec()) TN #define TnDATA_T OSSVPV* #define TV_PLANT_DAT(d) #define TV_UPROOT_DAT(d) #define TnSTOREDATA_T OSSVPV* #define TnDAT_ASSIGN(lval,rval) lval = rval #define TnFETCHDATA_T OSSVPV** #define TnDAT_FETCH(lval,rval) *lval = rval //#define TV_DUMP //#define TV_ESEEK_DEBUG #define TV_DAT_2STRING(dat) \ (sprintf(tmpbuf, "%s(0x%p)", dat->os_class(&na), dat), tmpbuf) #define TV_ESEEK_FDECL \ int dex2tc_seek(XPVTC *tc, int unique, osp_pathexam &exam) #if 0 #define TV_ESEEK_SETUP \ STMT_START { \ int kx; \ DEBUG_index(warn("seek [%d]", exam.keycnt)); \ for (kx=0; kx < exam.keycnt; kx++) { \ DEBUG_index(warn("key = %s", exam.keys[kx]->stringify())); \ } \ } STMT_END #endif /*0*/ #define TV_ESEEK_CMP(cmp,k,d) cmp=exam.compare(d, 0) #include "tv.public" #endif