From 561419374549201845bdd58e7329f61eef574f7f Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 10 Jan 2018 12:49:51 +0100 Subject: Task scheduler: Use restrict pointer qualifier Those pointers are never to be aliased, so let's be explicit about this and hope compiler does save some CPU ticks. --- source/blender/modifiers/intern/MOD_surfacedeform.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'source/blender/modifiers/intern/MOD_surfacedeform.c') diff --git a/source/blender/modifiers/intern/MOD_surfacedeform.c b/source/blender/modifiers/intern/MOD_surfacedeform.c index 99533289bce..17e6de4c34b 100644 --- a/source/blender/modifiers/intern/MOD_surfacedeform.c +++ b/source/blender/modifiers/intern/MOD_surfacedeform.c @@ -753,7 +753,10 @@ BLI_INLINE float computeNormalDisplacement(const float point_co[3], const float return normal_dist; } -static void bindVert(void *userdata, const int index, const ParallelRangeTLS *UNUSED(tls)) +static void bindVert( + void *__restrict userdata, + const int index, + const ParallelRangeTLS *__restrict UNUSED(tls)) { SDefBindCalcData * const data = (SDefBindCalcData *)userdata; float point_co[3]; @@ -1054,7 +1057,10 @@ static bool surfacedeformBind(SurfaceDeformModifierData *smd, float (*vertexCos) return data.success == 1; } -static void deformVert(void *userdata, const int index, const ParallelRangeTLS *UNUSED(tls)) +static void deformVert( + void *__restrict userdata, + const int index, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const SDefDeformData * const data = (SDefDeformData *)userdata; const SDefBind *sdbind = data->bind_verts[index].binds; -- cgit v1.2.3