diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-11-12 09:53:43 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-11-12 09:53:43 +0400 |
commit | 0bfc92ff8e16c76b8a01ace39f3e98b2beeda795 (patch) | |
tree | 08195a32c602cd6dab54edd7d0b7cae5f374d118 /source/blender/bmesh/bmesh_class.h | |
parent | 428e5b7a99eeae77caccbabbf32a7e596d0907d7 (diff) |
BM_iter_as_arrayN() can now take an optional existing array argument, useful to avoid many small malloc's by passing a fixes size stack variable instead.
Will give some speedup to edge-split modifier and bevel.
Diffstat (limited to 'source/blender/bmesh/bmesh_class.h')
-rw-r--r-- | source/blender/bmesh/bmesh_class.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/bmesh/bmesh_class.h b/source/blender/bmesh/bmesh_class.h index cff7da78ef2..32ae7824739 100644 --- a/source/blender/bmesh/bmesh_class.h +++ b/source/blender/bmesh/bmesh_class.h @@ -243,10 +243,16 @@ enum { # define BM_FACE_FIRST_LOOP(p) ((p)->l_first) #endif -/* size to use for static arrays when dealing with NGons, +/** + * size to use for stack arrays when dealing with NGons, * alloc after this limit is reached. * this value is rather arbitrary */ -#define BM_NGON_STACK_SIZE 32 +#define BM_DEFAULT_NGON_STACK_SIZE 32 +/** + * size to use for stack arrays dealing with connected mesh data + * verts of faces, edges of vert - etc. + * often used with #BM_iter_as_arrayN() */ +#define BM_DEFAULT_ITER_STACK_SIZE 16 /* avoid inf loop, this value is arbitrary * but should not error on valid cases */ |