diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-01-10 14:49:51 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-01-10 14:49:51 +0300 |
commit | 561419374549201845bdd58e7329f61eef574f7f (patch) | |
tree | cc2f7e759b13ef119480bfc239ae23cd4d3062a6 /source/blender/editors/sculpt_paint/paint_mask.c | |
parent | 518c65460e8843e425fee2161b407e1f8e9e4281 (diff) |
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.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_mask.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_mask.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c index d755bb707c2..264135d1d03 100644 --- a/source/blender/editors/sculpt_paint/paint_mask.c +++ b/source/blender/editors/sculpt_paint/paint_mask.c @@ -104,8 +104,10 @@ typedef struct MaskTaskData { float (*clip_planes_final)[4]; } MaskTaskData; -static void mask_flood_fill_task_cb(void *userdata, const int i, - const ParallelRangeTLS *UNUSED(tls)) +static void mask_flood_fill_task_cb( + void *__restrict userdata, + const int i, + const ParallelRangeTLS *__restrict UNUSED(tls)) { MaskTaskData *data = userdata; @@ -222,8 +224,10 @@ static void flip_plane(float out[4], const float in[4], const char symm) out[3] = in[3]; } -static void mask_box_select_task_cb(void *userdata, const int i, - const ParallelRangeTLS *UNUSED(tls)) +static void mask_box_select_task_cb( + void *__restrict userdata, + const int i, + const ParallelRangeTLS *__restrict UNUSED(tls)) { MaskTaskData *data = userdata; @@ -381,8 +385,10 @@ static void mask_lasso_px_cb(int x, int x_end, int y, void *user_data) } while (++index != index_end); } -static void mask_gesture_lasso_task_cb(void *userdata, const int i, - const ParallelRangeTLS *UNUSED(tls)) +static void mask_gesture_lasso_task_cb( + void *__restrict userdata, + const int i, + const ParallelRangeTLS *__restrict UNUSED(tls)) { LassoMaskData *lasso_data = userdata; MaskTaskData *data = &lasso_data->task_data; |