Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

KD tree node question

Orfey_Mutkov
Beginner
200 Views

Hi! My questionis about how to extract leaf information from theIpprKDTreeNode class. I try to do it in the manner that for example PBRT does, but the results are odd and incorrect. I get some negative values which I, honestly, fail to decipher.

I appreciate any help!

void dumpIPPtree( IpprKDTreeNode *pRoot, IpprKDTreeNode *pNode ) {

printf( "FLAG & 0x3 %d FLAG & ~0x3 = %u\n", pNode->flag_k_ofs & 0x3, pNode->flag_k_ofs & ~0x3 );

if( pNode->flag_k_ofs < 0 || (pNode->flag_k_ofs & 0x3)==3 ) {

printf( "COUNT = %u\n", pNode->tree_data.items ); return;

}

printf( "SPLIT = %f\n", pNode->tree_data.split );

dumpIPPtree( pRoot, (IpprKDTreeNode*)((Ipp8u*)pNode + (pNode->flag_k_ofs & ~0x3) + 0) );

dumpIPPtree( pRoot, (IpprKDTreeNode*)((Ipp8u*)pNode + (pNode->flag_k_ofs & ~0x3)) + 1 );

}

0 Kudos
0 Replies
Reply