本文整理汇总了C++中NodeRef::prefetchW方法的典型用法代码示例。如果您正苦于以下问题:C++ NodeRef::prefetchW方法的具体用法?C++ NodeRef::prefetchW怎么用?C++ NodeRef::prefetchW使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NodeRef
的用法示例。
在下文中一共展示了NodeRef::prefetchW方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: defined
BBox3fa BVHNRefitter<N>::recurse_bottom(NodeRef& ref)
{
/* this is a leaf node */
if (unlikely(ref.isLeaf()))
return leafBounds.leafBounds(ref);
/* recurse if this is an internal node */
AlignedNode* node = ref.alignedNode();
/* enable exclusive prefetch for >= AVX platforms */
#if defined(__AVX__)
ref.prefetchW();
#endif
BBox3fa bounds[N];
for (size_t i=0; i<N; i++)
if (unlikely(node->child(i) == BVH::emptyNode))
{
bounds[i] = BBox3fa(empty);
}
else
bounds[i] = recurse_bottom(node->child(i));
/* AOS to SOA transform */
BBox3vf<N> boundsT = transpose<N>(bounds);
/* set new bounds */
node->lower_x = boundsT.lower.x;
node->lower_y = boundsT.lower.y;
node->lower_z = boundsT.lower.z;
node->upper_x = boundsT.upper.x;
node->upper_y = boundsT.upper.y;
node->upper_z = boundsT.upper.z;
return merge<N>(bounds);
}