From ba7c2b7b7317a3d7f81bf0e70468124a6c06e96d Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 4 Apr 2016 12:55:24 +0200 Subject: [PATCH] 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. --- intern/cycles/bvh/bvh_build.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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"; } }