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>2014-10-20 14:40:41 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-10-20 15:04:46 +0400
commit52232141994327c55ec631b702ec3def327f1489 (patch)
tree65871b6b8cf29fdcddf4f78c64065bcb88beb2b9
parentd968a1ebb0a1c1a7a7b34cdeb31fc5096debc845 (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.
-rw-r--r--source/blender/editors/armature/meshlaplacian.c4
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];