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>2018-01-10 14:49:51 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-01-10 14:49:51 +0300
commit561419374549201845bdd58e7329f61eef574f7f (patch)
treecc2f7e759b13ef119480bfc239ae23cd4d3062a6 /source/blender/blenkernel/intern/pbvh.c
parent518c65460e8843e425fee2161b407e1f8e9e4281 (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/blenkernel/intern/pbvh.c')
-rw-r--r--source/blender/blenkernel/intern/pbvh.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c
index 43ea1ad83a0..46bd310066f 100644
--- a/source/blender/blenkernel/intern/pbvh.c
+++ b/source/blender/blenkernel/intern/pbvh.c
@@ -938,8 +938,10 @@ typedef struct PBVHUpdateData {
int flag;
} PBVHUpdateData;
-static void pbvh_update_normals_accum_task_cb(void *userdata, const int n,
- const ParallelRangeTLS *UNUSED(tls))
+static void pbvh_update_normals_accum_task_cb(
+ void *__restrict userdata,
+ const int n,
+ const ParallelRangeTLS *__restrict UNUSED(tls))
{
PBVHUpdateData *data = userdata;
@@ -992,8 +994,10 @@ static void pbvh_update_normals_accum_task_cb(void *userdata, const int n,
}
}
-static void pbvh_update_normals_store_task_cb(void *userdata, const int n,
- const ParallelRangeTLS *UNUSED(tls))
+static void pbvh_update_normals_store_task_cb(
+ void *__restrict userdata,
+ const int n,
+ const ParallelRangeTLS *__restrict UNUSED(tls))
{
PBVHUpdateData *data = userdata;
PBVH *bvh = data->bvh;
@@ -1063,8 +1067,10 @@ static void pbvh_update_normals(PBVH *bvh, PBVHNode **nodes,
MEM_freeN(vnors);
}
-static void pbvh_update_BB_redraw_task_cb(void *userdata, const int n,
- const ParallelRangeTLS *UNUSED(tls))
+static void pbvh_update_BB_redraw_task_cb(
+ void *__restrict userdata,
+ const int n,
+ const ParallelRangeTLS *__restrict UNUSED(tls))
{
PBVHUpdateData *data = userdata;
PBVH *bvh = data->bvh;