diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-07-30 15:56:47 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-07-30 15:56:47 +0300 |
commit | 5f405728bb4a6c32308371905955e87db851e5aa (patch) | |
tree | 8e8a4f6d51cd8f87678ff9200e35cc71a4240e46 /source/blender/modifiers/intern | |
parent | b9c257019fe256af6c2978b94b4948d18a6cd4eb (diff) |
BLI_task: Cleanup: rename some structs to make them more generic.
TLS and Settings can be used by other types of parallel 'for loops', so
removing 'Range' from their names.
No functional changes expected here.
Diffstat (limited to 'source/blender/modifiers/intern')
6 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/modifiers/intern/MOD_displace.c b/source/blender/modifiers/intern/MOD_displace.c index 50447ae0376..ac0d72214c8 100644 --- a/source/blender/modifiers/intern/MOD_displace.c +++ b/source/blender/modifiers/intern/MOD_displace.c @@ -169,7 +169,7 @@ typedef struct DisplaceUserdata { static void displaceModifier_do_task(void *__restrict userdata, const int iter, - const ParallelRangeTLS *__restrict UNUSED(tls)) + const TaskParallelTLS *__restrict UNUSED(tls)) { DisplaceUserdata *data = (DisplaceUserdata *)userdata; DisplaceModifierData *dmd = data->dmd; @@ -348,7 +348,7 @@ static void displaceModifier_do(DisplaceModifierData *dmd, data.pool = BKE_image_pool_new(); BKE_texture_fetch_images_for_pool(tex_target, data.pool); } - ParallelRangeSettings settings; + TaskParallelSettings settings; BLI_parallel_range_settings_defaults(&settings); settings.use_threading = (numVerts > 512); BLI_task_parallel_range(0, numVerts, &data, displaceModifier_do_task, &settings); diff --git a/source/blender/modifiers/intern/MOD_meshdeform.c b/source/blender/modifiers/intern/MOD_meshdeform.c index d89a47f4cf3..da261b4f835 100644 --- a/source/blender/modifiers/intern/MOD_meshdeform.c +++ b/source/blender/modifiers/intern/MOD_meshdeform.c @@ -259,7 +259,7 @@ typedef struct MeshdeformUserdata { static void meshdeform_vert_task(void *__restrict userdata, const int iter, - const ParallelRangeTLS *__restrict UNUSED(tls)) + const TaskParallelTLS *__restrict UNUSED(tls)) { MeshdeformUserdata *data = userdata; /*const*/ MeshDeformModifierData *mmd = data->mmd; @@ -435,7 +435,7 @@ static void meshdeformModifier_do(ModifierData *md, data.icagemat = icagemat; /* Do deformation. */ - ParallelRangeSettings settings; + TaskParallelSettings settings; BLI_parallel_range_settings_defaults(&settings); settings.min_iter_per_thread = 16; BLI_task_parallel_range(0, totvert, &data, meshdeform_vert_task, &settings); diff --git a/source/blender/modifiers/intern/MOD_ocean.c b/source/blender/modifiers/intern/MOD_ocean.c index 5cded96efe2..aff5b8b071b 100644 --- a/source/blender/modifiers/intern/MOD_ocean.c +++ b/source/blender/modifiers/intern/MOD_ocean.c @@ -196,7 +196,7 @@ typedef struct GenerateOceanGeometryData { static void generate_ocean_geometry_vertices(void *__restrict userdata, const int y, - const ParallelRangeTLS *__restrict UNUSED(tls)) + const TaskParallelTLS *__restrict UNUSED(tls)) { GenerateOceanGeometryData *gogd = userdata; int x; @@ -212,7 +212,7 @@ static void generate_ocean_geometry_vertices(void *__restrict userdata, static void generate_ocean_geometry_polygons(void *__restrict userdata, const int y, - const ParallelRangeTLS *__restrict UNUSED(tls)) + const TaskParallelTLS *__restrict UNUSED(tls)) { GenerateOceanGeometryData *gogd = userdata; int x; @@ -241,7 +241,7 @@ static void generate_ocean_geometry_polygons(void *__restrict userdata, static void generate_ocean_geometry_uvs(void *__restrict userdata, const int y, - const ParallelRangeTLS *__restrict UNUSED(tls)) + const TaskParallelTLS *__restrict UNUSED(tls)) { GenerateOceanGeometryData *gogd = userdata; int x; @@ -301,7 +301,7 @@ static Mesh *generate_ocean_geometry(OceanModifierData *omd) gogd.mpolys = result->mpoly; gogd.mloops = result->mloop; - ParallelRangeSettings settings; + TaskParallelSettings settings; BLI_parallel_range_settings_defaults(&settings); settings.use_threading = use_threading; diff --git a/source/blender/modifiers/intern/MOD_surfacedeform.c b/source/blender/modifiers/intern/MOD_surfacedeform.c index 47c0114f02f..c428325e42b 100644 --- a/source/blender/modifiers/intern/MOD_surfacedeform.c +++ b/source/blender/modifiers/intern/MOD_surfacedeform.c @@ -796,7 +796,7 @@ BLI_INLINE float computeNormalDisplacement(const float point_co[3], static void bindVert(void *__restrict userdata, const int index, - const ParallelRangeTLS *__restrict UNUSED(tls)) + const TaskParallelTLS *__restrict UNUSED(tls)) { SDefBindCalcData *const data = (SDefBindCalcData *)userdata; float point_co[3]; @@ -1076,7 +1076,7 @@ static bool surfacedeformBind(SurfaceDeformModifierData *smd, mul_v3_m4v3(data.targetCos[i], smd->mat, mvert[i].co); } - ParallelRangeSettings settings; + TaskParallelSettings settings; BLI_parallel_range_settings_defaults(&settings); settings.use_threading = (numverts > 10000); BLI_task_parallel_range(0, numverts, &data, bindVert, &settings); @@ -1116,7 +1116,7 @@ static bool surfacedeformBind(SurfaceDeformModifierData *smd, static void deformVert(void *__restrict userdata, const int index, - const ParallelRangeTLS *__restrict UNUSED(tls)) + const TaskParallelTLS *__restrict UNUSED(tls)) { const SDefDeformData *const data = (SDefDeformData *)userdata; const SDefBind *sdbind = data->bind_verts[index].binds; @@ -1247,7 +1247,7 @@ static void surfacedeformModifier_do(ModifierData *md, mul_v3_m4v3(data.targetCos[i], smd->mat, mvert[i].co); } - ParallelRangeSettings settings; + TaskParallelSettings settings; BLI_parallel_range_settings_defaults(&settings); settings.use_threading = (numverts > 10000); BLI_task_parallel_range(0, numverts, &data, deformVert, &settings); diff --git a/source/blender/modifiers/intern/MOD_uvwarp.c b/source/blender/modifiers/intern/MOD_uvwarp.c index 995f3d06fcb..2c5f4b66c23 100644 --- a/source/blender/modifiers/intern/MOD_uvwarp.c +++ b/source/blender/modifiers/intern/MOD_uvwarp.c @@ -98,7 +98,7 @@ typedef struct UVWarpData { static void uv_warp_compute(void *__restrict userdata, const int i, - const ParallelRangeTLS *__restrict UNUSED(tls)) + const TaskParallelTLS *__restrict UNUSED(tls)) { const UVWarpData *data = userdata; @@ -202,7 +202,7 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes .axis_u = axis_u, .axis_v = axis_v, }; - ParallelRangeSettings settings; + TaskParallelSettings settings; BLI_parallel_range_settings_defaults(&settings); settings.use_threading = (numPolys > 1000); BLI_task_parallel_range(0, numPolys, &data, uv_warp_compute, &settings); diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c index 37f25fd7c89..86d1b310d0c 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.c +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c @@ -92,7 +92,7 @@ typedef struct Vert2GeomDataChunk { */ static void vert2geom_task_cb_ex(void *__restrict userdata, const int iter, - const ParallelRangeTLS *__restrict tls) + const TaskParallelTLS *__restrict tls) { Vert2GeomData *data = userdata; Vert2GeomDataChunk *data_chunk = tls->userdata_chunk; @@ -188,7 +188,7 @@ static void get_vert2geom_distance(int numVerts, data.dist[1] = dist_e; data.dist[2] = dist_f; - ParallelRangeSettings settings; + TaskParallelSettings settings; BLI_parallel_range_settings_defaults(&settings); settings.use_threading = (numVerts > 10000); settings.userdata_chunk = &data_chunk; |