- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
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 );
}
Enlace copiado

- Suscribirse a un feed RSS
- Marcar tema como nuevo
- Marcar tema como leído
- Flotar este Tema para el usuario actual
- Favorito
- Suscribir
- Página de impresión sencilla