diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-10-20 14:40:41 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-10-20 15:04:46 +0400 |
commit | 52232141994327c55ec631b702ec3def327f1489 (patch) | |
tree | 65871b6b8cf29fdcddf4f78c64065bcb88beb2b9 /source/blender | |
parent | d968a1ebb0a1c1a7a7b34cdeb31fc5096debc845 (diff) |
Optimization for mesh deform: use BLI_INLINE specifiers
This helps compiler to do detect stuff which might be inlined,
gives around 30% speedup on my laptop with test files from ZanQdo.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/armature/meshlaplacian.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index 49650fcadbf..b7d14e089cf 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -1303,7 +1303,7 @@ static int meshdeform_inside_cage(MeshDeformBind *mdb, float *co) /* solving */ -static int meshdeform_index(MeshDeformBind *mdb, int x, int y, int z, int n) +BLI_INLINE int meshdeform_index(MeshDeformBind *mdb, int x, int y, int z, int n) { int size = mdb->size; @@ -1321,7 +1321,7 @@ static int meshdeform_index(MeshDeformBind *mdb, int x, int y, int z, int n) return x + y * size + z * size * size; } -static void meshdeform_cell_center(MeshDeformBind *mdb, int x, int y, int z, int n, float *center) +BLI_INLINE void meshdeform_cell_center(MeshDeformBind *mdb, int x, int y, int z, int n, float *center) { x += MESHDEFORM_OFFSET[n][0]; y += MESHDEFORM_OFFSET[n][1]; |