diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-01-10 20:32:44 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-01-12 12:49:59 +0300 |
commit | c707b91ce6b14182a3a579b645cfd832fc1ae658 (patch) | |
tree | bffa2e62e92bb5892365380641b6d2347b20a797 /intern/cycles/bvh/bvh_build.h | |
parent | b56f5900dc776c45d83c99334473d1cb3874feaf (diff) |
Cycles: Optimize leaf splitting code by avoid vector allocation
Use variables allocated in the stack and avoid heap allocation which should make
leaf splitting code a bit faster.
Diffstat (limited to 'intern/cycles/bvh/bvh_build.h')
-rw-r--r-- | intern/cycles/bvh/bvh_build.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/intern/cycles/bvh/bvh_build.h b/intern/cycles/bvh/bvh_build.h index 75c64be6eab..1e629fb5eb2 100644 --- a/intern/cycles/bvh/bvh_build.h +++ b/intern/cycles/bvh/bvh_build.h @@ -72,12 +72,13 @@ protected: /* Leaf node type splitting. */ BVHNode *create_leaf_node_split(const BVHRange& range); - BVHNode *create_primitive_leaf_node(const vector<int>& p_type, - const vector<int>& p_index, - const vector<int>& p_object, + BVHNode *create_primitive_leaf_node(const int *p_type, + const int *p_index, + const int *p_object, const BoundBox& bounds, uint visibility, - int start); + int start, + int nun); bool range_within_max_leaf_size(const BVHRange& range); |