Removed commented-out code in topTree.*

This commit is contained in:
Ivan Skytte Jørgensen
2017-06-12 13:14:19 +02:00
parent edc214d1fa
commit 6e95ffa4a7
2 changed files with 0 additions and 51 deletions

@ -25,7 +25,6 @@ TopTree::TopTree() {
memset(m_domCount, 0, sizeof(m_domCount));
memset(m_domMinNode, 0, sizeof(m_domMinNode));
// sampleVectors = NULL;
reset();
}
@ -59,7 +58,6 @@ bool TopTree::setNumNodes ( int32_t docsWanted , bool doSiteClustering ) {
// reset this
m_kickedOutDocIds = false;
//m_lastKickedOutDocId = -1LL;
// how many nodes to we need to accomodate "docsWanted" docids?
// we boost it up here for domain/host counting for site clustering.
@ -324,7 +322,6 @@ bool TopTree::addNode ( TopNode *t , int32_t tnn ) {
key96_t k;
k.n1 = domHash << 24; // 1 byte domHash
//k.n1 |= (t->m_bscore & ~0xc0) << 16; // 1 byte bscore
k.n1 |= cs >> 16; // 4 byte score
k.n0 = ((int64_t)cs) << (64-16);
k.n0 |= t->m_docId; // getDocIdFromPtr ( t->m_docIdPtr );
@ -354,13 +351,6 @@ bool TopTree::addNode ( TopNode *t , int32_t tnn ) {
n = m_t2.addNode_unlocked ( 0 , (const char *)&k , NULL , 4 );
// the next node before the current min will be the next min
int32_t next = m_t2.getNextNode_unlocked(min);
// sanity check
//if ( next < 0 ) gbshutdownLogicError();
// sanity check
//key96_t *kp1 = (key96_t *)m_t2.getKey(min);
//if ( (kp1->n1) >>24 != domHash ) gbshutdownLogicError();
//key96_t *kp2 = (key96_t *)m_t2.getKey(next);
//if ( (kp2->n1) >>24 != domHash ) gbshutdownLogicError();
// the new min is the "next" of the old min
m_domMinNode[domHash] = next;
// get his "node number" in the top tree, "nn" so we can
@ -377,11 +367,6 @@ bool TopTree::addNode ( TopNode *t , int32_t tnn ) {
else
if ( m_doSiteClustering ) {
n = m_t2.addNode_unlocked ( 0 , (const char *)&k , NULL , 4 );
// sanity check
//if ( min > 0 ) {
// key96_t *kp1 = (key96_t *)m_t2.getKey(min);
// if ( (kp1->n1) >>24 != domHash ) gbshutdownLogicError();
//}
// are we the new min? if so, assign it
if ( min == -1 || k < *(reinterpret_cast<const key96_t*>(m_t2.getKey_unlocked(min))) )
m_domMinNode[domHash] = n;
@ -515,11 +500,6 @@ bool TopTree::addNode ( TopNode *t , int32_t tnn ) {
//}
continue;
}
// sanity check
//if ( next < 0 ) gbshutdownLogicError();
// sanity check
//key96_t *kp2 = (key96_t *)m_t2.getKey(next);
//if ( (kp2->n1) >>24 != domHash2 ) gbshutdownLogicError();
// the new min is the "next" of the old min
m_domMinNode[domHash2] = next;
}
@ -1105,5 +1085,3 @@ void TopTree::logTreeData(int32_t loglevel) {
log(loglevel," TopTree[%02" PRId32 "].m_docId: %14" PRId64 ", score: %f", i, m_nodes[i].m_docId, m_nodes[i].m_score);
}
}

@ -12,10 +12,6 @@
class TopNode {
public:
//unsigned char m_bscore ; // bit #6(0x40) is on if has all explicitly
// do not allow a higher-tiered node to outrank a lower that has
// bit #6 set, under any circumstance
char m_depth ;
// Msg39 now looks up the cluster recs so we can do clustering
@ -24,8 +20,6 @@ class TopNode {
char m_clusterLevel;
key96_t m_clusterRec;
// no longer needed, Msg3a does not need, it has already
//unsigned char m_tier ;
float m_score ;
int64_t m_docId;
unsigned m_flags; //from Docid2FlagsAndSiteMap
@ -33,32 +27,10 @@ class TopNode {
// option for using int scores
int32_t m_intScore;
// clustering info
//int32_t m_kid ; // result from our same site below us
//uint32_t m_siteHash ;
//uint32_t m_contentHash ;
//int32_t m_rank ;
// the lower 64 bits of the cluster rec, used by Msg51, the new
// class for doing site clustering
//uint64_t m_clusterRec;
// . for getting similarity between titleRecs
// . this is so big only include if we need it
//int32_t m_vector [ VECTOR_SIZE ];
// tree info, indexes into m_nodes array
int32_t m_parent;
int32_t m_left; // kid
int32_t m_right; // kid
// so we can quickly remove its scoring info from the scoreinfo
// buf and replace with new docid's scoring info
//int64_t m_scoreInfoBufOffset;
//int64_t getDocId ( );
//int64_t getDocIdForMsg3a ( );
};
class TopTree {
@ -132,7 +104,6 @@ private:
float m_partial;
int64_t m_ridiculousMax;
bool m_kickedOutDocIds;
//int64_t m_lastKickedOutDocId;
int32_t m_domCount[256];
// the node with the minimum "score" for that domHash
int32_t m_domMinNode[256];