[Bf-blender-cvs] [ba7c2b7] master: Cycles: Log allocation slop factor for BVH arrays
Sergey Sharybin
noreply at git.blender.org
Mon Apr 4 13:02:17 CEST 2016
Commit: ba7c2b7b7317a3d7f81bf0e70468124a6c06e96d
Author: Sergey Sharybin
Date: Mon Apr 4 12:55:24 2016 +0200
Branches: master
https://developer.blender.org/rBba7c2b7b7317a3d7f81bf0e70468124a6c06e96d
Cycles: Log allocation slop factor for BVH arrays
Currently they're staying at 1 (actual size over capacity), but we
will be changing it quite soon in order to avoid having too much
memory re-allocation happening at a BVH build time and will be
playing with different policies for that.
===================================================================
M intern/cycles/bvh/bvh_build.cpp
===================================================================
diff --git a/intern/cycles/bvh/bvh_build.cpp b/intern/cycles/bvh/bvh_build.cpp
index 9f77ea3..3f43ae7 100644
--- a/intern/cycles/bvh/bvh_build.cpp
+++ b/intern/cycles/bvh/bvh_build.cpp
@@ -293,7 +293,11 @@ BVHNode* BVHBuild::run()
<< " Number of inner nodes: "
<< rootnode->getSubtreeSize(BVH_STAT_INNER_COUNT) << "\n"
<< " Number of leaf nodes: "
- << rootnode->getSubtreeSize(BVH_STAT_LEAF_COUNT) << "\n";
+ << rootnode->getSubtreeSize(BVH_STAT_LEAF_COUNT) << "\n"
+ << " Allocation slop factor: "
+ << ((prim_type.capacity() != 0)
+ ? (float)prim_type.size() / prim_type.capacity()
+ : 1.0f) << "\n";
}
}
More information about the Bf-blender-cvs
mailing list