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_cursor.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_cursor.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_cursor.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index 84e75f0e7fc..e8778eea3b9 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -151,7 +151,10 @@ typedef struct LoadTexData { float radius; } LoadTexData; -static void load_tex_task_cb_ex(void *userdata, const int j, const ParallelRangeTLS *tls) +static void load_tex_task_cb_ex( + void *__restrict userdata, + const int j, + const ParallelRangeTLS *__restrict tls) { LoadTexData *data = userdata; Brush *br = data->br; @@ -369,7 +372,10 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima return 1; } -static void load_tex_cursor_task_cb(void *userdata, const int j, const ParallelRangeTLS *UNUSED(tls)) +static void load_tex_cursor_task_cb( + void *__restrict userdata, + const int j, + const ParallelRangeTLS *__restrict UNUSED(tls)) { LoadTexData *data = userdata; Brush *br = data->br; |