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/blenkernel/intern/CCGSubSurf_legacy.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/blenkernel/intern/CCGSubSurf_legacy.c')
-rw-r--r-- | source/blender/blenkernel/intern/CCGSubSurf_legacy.c | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/CCGSubSurf_legacy.c b/source/blender/blenkernel/intern/CCGSubSurf_legacy.c index 363b7cff453..d289f63dac1 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf_legacy.c +++ b/source/blender/blenkernel/intern/CCGSubSurf_legacy.c @@ -136,8 +136,10 @@ typedef struct CCGSubSurfCalcSubdivData { int curLvl; } CCGSubSurfCalcSubdivData; -static void ccgSubSurf__calcVertNormals_faces_accumulate_cb(void *userdata, int ptrIdx, - const ParallelRangeTLS *UNUSED(tls)) +static void ccgSubSurf__calcVertNormals_faces_accumulate_cb( + void *__restrict userdata, + int ptrIdx, + const ParallelRangeTLS *__restrict UNUSED(tls)) { CCGSubSurfCalcSubdivData *data = userdata; @@ -228,8 +230,10 @@ static void ccgSubSurf__calcVertNormals_faces_accumulate_cb(void *userdata, int } } -static void ccgSubSurf__calcVertNormals_faces_finalize_cb(void *userdata, int ptrIdx, - const ParallelRangeTLS *UNUSED(tls)) +static void ccgSubSurf__calcVertNormals_faces_finalize_cb( + void *__restrict userdata, + int ptrIdx, + const ParallelRangeTLS *__restrict UNUSED(tls)) { CCGSubSurfCalcSubdivData *data = userdata; @@ -267,8 +271,10 @@ static void ccgSubSurf__calcVertNormals_faces_finalize_cb(void *userdata, int pt } } -static void ccgSubSurf__calcVertNormals_edges_accumulate_cb(void *userdata, int ptrIdx, - const ParallelRangeTLS *UNUSED(tls)) +static void ccgSubSurf__calcVertNormals_edges_accumulate_cb( + void *__restrict userdata, + int ptrIdx, + const ParallelRangeTLS *__restrict UNUSED(tls)) { CCGSubSurfCalcSubdivData *data = userdata; @@ -414,8 +420,10 @@ static void ccgSubSurf__calcVertNormals(CCGSubSurf *ss, } -static void ccgSubSurf__calcSubdivLevel_interior_faces_edges_midpoints_cb(void *userdata, int ptrIdx, - const ParallelRangeTLS *UNUSED(tls)) +static void ccgSubSurf__calcSubdivLevel_interior_faces_edges_midpoints_cb( + void *__restrict userdata, + int ptrIdx, + const ParallelRangeTLS *__restrict UNUSED(tls)) { CCGSubSurfCalcSubdivData *data = userdata; @@ -502,8 +510,10 @@ static void ccgSubSurf__calcSubdivLevel_interior_faces_edges_midpoints_cb(void * } } -static void ccgSubSurf__calcSubdivLevel_interior_faces_edges_centerpoints_shift_cb(void *userdata, int ptrIdx, - const ParallelRangeTLS *UNUSED(tls)) +static void ccgSubSurf__calcSubdivLevel_interior_faces_edges_centerpoints_shift_cb( + void *__restrict userdata, + int ptrIdx, + const ParallelRangeTLS *__restrict UNUSED(tls)) { CCGSubSurfCalcSubdivData *data = userdata; @@ -608,8 +618,10 @@ static void ccgSubSurf__calcSubdivLevel_interior_faces_edges_centerpoints_shift_ } } -static void ccgSubSurf__calcSubdivLevel_verts_copydata_cb(void *userdata, int ptrIdx, - const ParallelRangeTLS *UNUSED(tls)) +static void ccgSubSurf__calcSubdivLevel_verts_copydata_cb( + void *__restrict userdata, + int ptrIdx, + const ParallelRangeTLS *__restrict UNUSED(tls)) { CCGSubSurfCalcSubdivData *data = userdata; |