- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 );
}
Link Copied
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page