Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-04-04 13:55:24 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-04-04 13:56:56 +0300
commitba7c2b7b7317a3d7f81bf0e70468124a6c06e96d (patch)
treea8721ba2de12bd62dcd61057d9bd65621281b508 /intern/cycles/bvh/bvh_build.cpp
parent5d255796026775e1a1345a24340a0db3fb2cc91f (diff)
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.
Diffstat (limited to 'intern/cycles/bvh/bvh_build.cpp')
-rw-r--r--intern/cycles/bvh/bvh_build.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/intern/cycles/bvh/bvh_build.cpp b/intern/cycles/bvh/bvh_build.cpp
index 9f77ea3d201..3f43ae7bade 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";
}
}