BLI_task: Cleanup: rename some structs to make them more generic.
authorBastien Montagne <montagne29@wanadoo.fr>
Tue, 30 Jul 2019 12:56:47 +0000 (14:56 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Tue, 30 Jul 2019 12:56:47 +0000 (14:56 +0200)
TLS and Settings can be used by other types of parallel 'for loops', so
removing 'Range' from their names.

No functional changes expected here.

44 files changed:
source/blender/blenkernel/intern/CCGSubSurf_legacy.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/collision.c
source/blender/blenkernel/intern/colortools.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/lattice.c
source/blender/blenkernel/intern/mask_rasterize.c
source/blender/blenkernel/intern/mesh_evaluate.c
source/blender/blenkernel/intern/multires.c
source/blender/blenkernel/intern/multires_reshape.c
source/blender/blenkernel/intern/ocean.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/pbvh.c
source/blender/blenkernel/intern/shrinkwrap.c
source/blender/blenkernel/intern/smoke.c
source/blender/blenkernel/intern/subdiv_ccg.c
source/blender/blenkernel/intern/subdiv_foreach.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenkernel/intern/tracking_auto.c
source/blender/blenkernel/intern/tracking_stabilize.c
source/blender/blenlib/BLI_task.h
source/blender/blenlib/intern/BLI_kdopbvh.c
source/blender/blenlib/intern/math_statistics.c
source/blender/blenlib/intern/task.c
source/blender/bmesh/intern/bmesh_interp.c
source/blender/depsgraph/intern/depsgraph_tag.cc
source/blender/depsgraph/intern/eval/deg_eval.cc
source/blender/depsgraph/intern/eval/deg_eval_flush.cc
source/blender/editors/physics/particle_edit.c
source/blender/editors/sculpt_paint/paint_cursor.c
source/blender/editors/sculpt_paint/paint_image_2d.c
source/blender/editors/sculpt_paint/paint_mask.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/sculpt_paint/sculpt_undo.c
source/blender/editors/space_sequencer/sequencer_scopes.c
source/blender/modifiers/intern/MOD_displace.c
source/blender/modifiers/intern/MOD_meshdeform.c
source/blender/modifiers/intern/MOD_ocean.c
source/blender/modifiers/intern/MOD_surfacedeform.c
source/blender/modifiers/intern/MOD_uvwarp.c
source/blender/modifiers/intern/MOD_weightvgproximity.c
source/blender/render/intern/source/pointdensity.c

index 720c828664aaa80b7e713a1a10cb650d55f0605f..d8b30c9d4ef89b1913e087a662abb8feb233d41d 100644 (file)
@@ -135,7 +135,7 @@ typedef struct CCGSubSurfCalcSubdivData {
 } CCGSubSurfCalcSubdivData;
 
 static void ccgSubSurf__calcVertNormals_faces_accumulate_cb(
-    void *__restrict userdata, const int ptrIdx, const ParallelRangeTLS *__restrict UNUSED(tls))
+    void *__restrict userdata, const int ptrIdx, const TaskParallelTLS *__restrict UNUSED(tls))
 {
   CCGSubSurfCalcSubdivData *data = userdata;
 
@@ -234,7 +234,7 @@ static void ccgSubSurf__calcVertNormals_faces_accumulate_cb(
 }
 
 static void ccgSubSurf__calcVertNormals_faces_finalize_cb(
-    void *__restrict userdata, const int ptrIdx, const ParallelRangeTLS *__restrict UNUSED(tls))
+    void *__restrict userdata, const int ptrIdx, const TaskParallelTLS *__restrict UNUSED(tls))
 {
   CCGSubSurfCalcSubdivData *data = userdata;
 
@@ -273,7 +273,7 @@ static void ccgSubSurf__calcVertNormals_faces_finalize_cb(
 }
 
 static void ccgSubSurf__calcVertNormals_edges_accumulate_cb(
-    void *__restrict userdata, const int ptrIdx, const ParallelRangeTLS *__restrict UNUSED(tls))
+    void *__restrict userdata, const int ptrIdx, const TaskParallelTLS *__restrict UNUSED(tls))
 {
   CCGSubSurfCalcSubdivData *data = userdata;
 
@@ -347,7 +347,7 @@ static void ccgSubSurf__calcVertNormals(CCGSubSurf *ss,
   };
 
   {
-    ParallelRangeSettings settings;
+    TaskParallelSettings settings;
     BLI_parallel_range_settings_defaults(&settings);
     settings.min_iter_per_thread = CCG_TASK_LIMIT;
     BLI_task_parallel_range(
@@ -379,7 +379,7 @@ static void ccgSubSurf__calcVertNormals(CCGSubSurf *ss,
   }
 
   {
-    ParallelRangeSettings settings;
+    TaskParallelSettings settings;
     BLI_parallel_range_settings_defaults(&settings);
     settings.min_iter_per_thread = CCG_TASK_LIMIT;
     BLI_task_parallel_range(
@@ -387,7 +387,7 @@ static void ccgSubSurf__calcVertNormals(CCGSubSurf *ss,
   }
 
   {
-    ParallelRangeSettings settings;
+    TaskParallelSettings settings;
     BLI_parallel_range_settings_defaults(&settings);
     settings.min_iter_per_thread = CCG_TASK_LIMIT;
     BLI_task_parallel_range(
@@ -425,7 +425,7 @@ static void ccgSubSurf__calcVertNormals(CCGSubSurf *ss,
 }
 
 static void ccgSubSurf__calcSubdivLevel_interior_faces_edges_midpoints_cb(
-    void *__restrict userdata, const int ptrIdx, const ParallelRangeTLS *__restrict UNUSED(tls))
+    void *__restrict userdata, const int ptrIdx, const TaskParallelTLS *__restrict UNUSED(tls))
 {
   CCGSubSurfCalcSubdivData *data = userdata;
 
@@ -513,7 +513,7 @@ static void ccgSubSurf__calcSubdivLevel_interior_faces_edges_midpoints_cb(
 }
 
 static void ccgSubSurf__calcSubdivLevel_interior_faces_edges_centerpoints_shift_cb(
-    void *__restrict userdata, const int ptrIdx, const ParallelRangeTLS *__restrict UNUSED(tls))
+    void *__restrict userdata, const int ptrIdx, const TaskParallelTLS *__restrict UNUSED(tls))
 {
   CCGSubSurfCalcSubdivData *data = userdata;
 
@@ -619,7 +619,7 @@ static void ccgSubSurf__calcSubdivLevel_interior_faces_edges_centerpoints_shift_
 }
 
 static void ccgSubSurf__calcSubdivLevel_verts_copydata_cb(
-    void *__restrict userdata, const int ptrIdx, const ParallelRangeTLS *__restrict UNUSED(tls))
+    void *__restrict userdata, const int ptrIdx, const TaskParallelTLS *__restrict UNUSED(tls))
 {
   CCGSubSurfCalcSubdivData *data = userdata;
 
@@ -691,7 +691,7 @@ static void ccgSubSurf__calcSubdivLevel(CCGSubSurf *ss,
   };
 
   {
-    ParallelRangeSettings settings;
+    TaskParallelSettings settings;
     BLI_parallel_range_settings_defaults(&settings);
     settings.min_iter_per_thread = CCG_TASK_LIMIT;
     BLI_task_parallel_range(0,
@@ -991,7 +991,7 @@ static void ccgSubSurf__calcSubdivLevel(CCGSubSurf *ss,
   }
 
   {
-    ParallelRangeSettings settings;
+    TaskParallelSettings settings;
     BLI_parallel_range_settings_defaults(&settings);
     settings.min_iter_per_thread = CCG_TASK_LIMIT;
     BLI_task_parallel_range(0,
@@ -1012,7 +1012,7 @@ static void ccgSubSurf__calcSubdivLevel(CCGSubSurf *ss,
   }
 
   {
-    ParallelRangeSettings settings;
+    TaskParallelSettings settings;
     BLI_parallel_range_settings_defaults(&settings);
     settings.min_iter_per_thread = CCG_TASK_LIMIT;
     BLI_task_parallel_range(
index 9caef48ec69e491e7b8af887c5e7229e534f5091..742e3634bf16eed03a0050f953ee06358301d23f 100644 (file)
@@ -1379,7 +1379,7 @@ typedef struct ArmatureUserdata {
 
 static void armature_vert_task(void *__restrict userdata,
                                const int i,
-                               const ParallelRangeTLS *__restrict UNUSED(tls))
+                               const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const ArmatureUserdata *data = userdata;
   float(*const vertexCos)[3] = data->vertexCos;
@@ -1677,7 +1677,7 @@ void armature_deform_verts(Object *armOb,
   mul_m4_m4m4(data.postmat, obinv, armOb->obmat);
   invert_m4_m4(data.premat, data.postmat);
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.min_iter_per_thread = 32;
   BLI_task_parallel_range(0, numVerts, &data, armature_vert_task, &settings);
index ff6258ac339f0833d0d72c2b91e0dc16b17e50da..69afda9997ae5942f6673cd89a404e6f6a368fea 100644 (file)
@@ -851,7 +851,7 @@ static int cloth_selfcollision_response_static(ClothModifierData *clmd,
 
 static void cloth_collision(void *__restrict userdata,
                             const int index,
-                            const ParallelRangeTLS *__restrict UNUSED(tls))
+                            const TaskParallelTLS *__restrict UNUSED(tls))
 {
   ColDetectData *data = (ColDetectData *)userdata;
 
@@ -908,7 +908,7 @@ static void cloth_collision(void *__restrict userdata,
 
 static void cloth_selfcollision(void *__restrict userdata,
                                 const int index,
-                                const ParallelRangeTLS *__restrict UNUSED(tls))
+                                const TaskParallelTLS *__restrict UNUSED(tls))
 {
   SelfColDetectData *data = (SelfColDetectData *)userdata;
 
@@ -1154,7 +1154,7 @@ static bool cloth_bvh_objcollisions_nearcheck(ClothModifierData *clmd,
       .collided = false,
   };
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = true;
   BLI_task_parallel_range(0, numresult, &data, cloth_collision, &settings);
@@ -1174,7 +1174,7 @@ static bool cloth_bvh_selfcollisions_nearcheck(ClothModifierData *clmd,
       .collided = false,
   };
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = true;
   BLI_task_parallel_range(0, numresult, &data, cloth_selfcollision, &settings);
index 863d6351738d92daf1201168293beb19a46e5186..aa5f74c629783680b7fce8c7acc1593f7d1a0465 100644 (file)
@@ -1385,7 +1385,7 @@ typedef struct ScopesUpdateDataChunk {
 
 static void scopes_update_cb(void *__restrict userdata,
                              const int y,
-                             const ParallelRangeTLS *__restrict tls)
+                             const TaskParallelTLS *__restrict tls)
 {
   const ScopesUpdateData *data = userdata;
 
@@ -1634,7 +1634,7 @@ void scopes_update(Scopes *scopes,
   ScopesUpdateDataChunk data_chunk = {{0}};
   INIT_MINMAX(data_chunk.min, data_chunk.max);
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = (ibuf->y > 256);
   settings.userdata_chunk = &data_chunk;
index 7e916feac244684b8f3bd54099bf49ac829c7076..936fe3b3beae2551b6c8ba352100baffa27d90a3 100644 (file)
@@ -645,7 +645,7 @@ static void freeGrid(PaintSurfaceData *data)
 
 static void grid_bound_insert_cb_ex(void *__restrict userdata,
                                     const int i,
-                                    const ParallelRangeTLS *__restrict tls)
+                                    const TaskParallelTLS *__restrict tls)
 {
   PaintBakeData *bData = userdata;
 
@@ -667,7 +667,7 @@ static void grid_bound_insert_finalize(void *__restrict userdata, void *__restri
 
 static void grid_cell_points_cb_ex(void *__restrict userdata,
                                    const int i,
-                                   const ParallelRangeTLS *__restrict tls)
+                                   const TaskParallelTLS *__restrict tls)
 {
   PaintBakeData *bData = userdata;
   VolumeGrid *grid = bData->grid;
@@ -702,7 +702,7 @@ static void grid_cell_points_finalize(void *__restrict userdata, void *__restric
 
 static void grid_cell_bounds_cb(void *__restrict userdata,
                                 const int x,
-                                const ParallelRangeTLS *__restrict UNUSED(tls))
+                                const TaskParallelTLS *__restrict UNUSED(tls))
 {
   PaintBakeData *bData = userdata;
   VolumeGrid *grid = bData->grid;
@@ -749,7 +749,7 @@ static void surfaceGenerateGrid(struct DynamicPaintSurface *surface)
     /* Important to init correctly our ref grid_bound... */
     boundInsert(&grid->grid_bounds, bData->realCoord[bData->s_pos[0]].v);
     {
-      ParallelRangeSettings settings;
+      TaskParallelSettings settings;
       BLI_parallel_range_settings_defaults(&settings);
       settings.use_threading = (sData->total_points > 1000);
       settings.userdata_chunk = &grid->grid_bounds;
@@ -810,7 +810,7 @@ static void surfaceGenerateGrid(struct DynamicPaintSurface *surface)
     if (!error) {
       /* calculate number of points within each cell */
       {
-        ParallelRangeSettings settings;
+        TaskParallelSettings settings;
         BLI_parallel_range_settings_defaults(&settings);
         settings.use_threading = (sData->total_points > 1000);
         settings.userdata_chunk = grid->s_num;
@@ -834,7 +834,7 @@ static void surfaceGenerateGrid(struct DynamicPaintSurface *surface)
 
       /* calculate cell bounds */
       {
-        ParallelRangeSettings settings;
+        TaskParallelSettings settings;
         BLI_parallel_range_settings_defaults(&settings);
         settings.use_threading = (grid_cells > 1000);
         BLI_task_parallel_range(0, grid->dim[0], bData, grid_cell_bounds_cb, &settings);
@@ -1508,7 +1508,7 @@ typedef struct DynamicPaintSetInitColorData {
 } DynamicPaintSetInitColorData;
 
 static void dynamic_paint_set_init_color_tex_to_vcol_cb(
-    void *__restrict userdata, const int i, const ParallelRangeTLS *__restrict UNUSED(tls))
+    void *__restrict userdata, const int i, const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const DynamicPaintSetInitColorData *data = userdata;
 
@@ -1543,7 +1543,7 @@ static void dynamic_paint_set_init_color_tex_to_vcol_cb(
 }
 
 static void dynamic_paint_set_init_color_tex_to_imseq_cb(
-    void *__restrict userdata, const int i, const ParallelRangeTLS *__restrict UNUSED(tls))
+    void *__restrict userdata, const int i, const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const DynamicPaintSetInitColorData *data = userdata;
 
@@ -1582,7 +1582,7 @@ static void dynamic_paint_set_init_color_tex_to_imseq_cb(
 }
 
 static void dynamic_paint_set_init_color_vcol_to_imseq_cb(
-    void *__restrict userdata, const int i, const ParallelRangeTLS *__restrict UNUSED(tls))
+    void *__restrict userdata, const int i, const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const DynamicPaintSetInitColorData *data = userdata;
 
@@ -1667,7 +1667,7 @@ static void dynamicPaint_setInitialColor(const Scene *scene, DynamicPaintSurface
           .pool = pool,
           .scene_color_manage = scene_color_manage,
       };
-      ParallelRangeSettings settings;
+      TaskParallelSettings settings;
       BLI_parallel_range_settings_defaults(&settings);
       settings.use_threading = (tottri > 1000);
       BLI_task_parallel_range(
@@ -1681,7 +1681,7 @@ static void dynamicPaint_setInitialColor(const Scene *scene, DynamicPaintSurface
           .mloopuv = mloopuv,
           .scene_color_manage = scene_color_manage,
       };
-      ParallelRangeSettings settings;
+      TaskParallelSettings settings;
       BLI_parallel_range_settings_defaults(&settings);
       settings.use_threading = (sData->total_points > 1000);
       BLI_task_parallel_range(
@@ -1718,7 +1718,7 @@ static void dynamicPaint_setInitialColor(const Scene *scene, DynamicPaintSurface
           .mlooptri = mlooptri,
           .mloopcol = col,
       };
-      ParallelRangeSettings settings;
+      TaskParallelSettings settings;
       BLI_parallel_range_settings_defaults(&settings);
       settings.use_threading = (sData->total_points > 1000);
       BLI_task_parallel_range(
@@ -1820,7 +1820,7 @@ typedef struct DynamicPaintModifierApplyData {
 
 static void dynamic_paint_apply_surface_displace_cb(void *__restrict userdata,
                                                     const int i,
-                                                    const ParallelRangeTLS *__restrict UNUSED(tls))
+                                                    const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const DynamicPaintModifierApplyData *data = userdata;
 
@@ -1854,7 +1854,7 @@ static void dynamicPaint_applySurfaceDisplace(DynamicPaintSurface *surface, Mesh
         .surface = surface,
         .mvert = mvert,
     };
-    ParallelRangeSettings settings;
+    TaskParallelSettings settings;
     BLI_parallel_range_settings_defaults(&settings);
     settings.use_threading = (sData->total_points > 10000);
     BLI_task_parallel_range(
@@ -1863,7 +1863,7 @@ static void dynamicPaint_applySurfaceDisplace(DynamicPaintSurface *surface, Mesh
 }
 
 static void dynamic_paint_apply_surface_vpaint_blend_cb(
-    void *__restrict userdata, const int i, const ParallelRangeTLS *__restrict UNUSED(tls))
+    void *__restrict userdata, const int i, const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const DynamicPaintModifierApplyData *data = userdata;
 
@@ -1877,7 +1877,7 @@ static void dynamic_paint_apply_surface_vpaint_blend_cb(
 
 static void dynamic_paint_apply_surface_vpaint_cb(void *__restrict userdata,
                                                   const int p_index,
-                                                  const ParallelRangeTLS *__restrict UNUSED(tls))
+                                                  const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const DynamicPaintModifierApplyData *data = userdata;
 
@@ -1913,7 +1913,7 @@ static void dynamic_paint_apply_surface_vpaint_cb(void *__restrict userdata,
 
 static void dynamic_paint_apply_surface_wave_cb(void *__restrict userdata,
                                                 const int i,
-                                                const ParallelRangeTLS *__restrict UNUSED(tls))
+                                                const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const DynamicPaintModifierApplyData *data = userdata;
 
@@ -1966,7 +1966,7 @@ static Mesh *dynamicPaint_Modifier_apply(DynamicPaintModifierData *pmd, Object *
                 .fcolor = fcolor,
             };
             {
-              ParallelRangeSettings settings;
+              TaskParallelSettings settings;
               BLI_parallel_range_settings_defaults(&settings);
               settings.use_threading = (sData->total_points > 1000);
               BLI_task_parallel_range(0,
@@ -2001,7 +2001,7 @@ static Mesh *dynamicPaint_Modifier_apply(DynamicPaintModifierData *pmd, Object *
             data.mloopcol_wet = mloopcol_wet;
 
             {
-              ParallelRangeSettings settings;
+              TaskParallelSettings settings;
               BLI_parallel_range_settings_defaults(&settings);
               settings.use_threading = (totpoly > 1000);
               BLI_task_parallel_range(
@@ -2053,7 +2053,7 @@ static Mesh *dynamicPaint_Modifier_apply(DynamicPaintModifierData *pmd, Object *
                 .surface = surface,
                 .mvert = mvert,
             };
-            ParallelRangeSettings settings;
+            TaskParallelSettings settings;
             BLI_parallel_range_settings_defaults(&settings);
             settings.use_threading = (sData->total_points > 1000);
             BLI_task_parallel_range(
@@ -2236,7 +2236,7 @@ typedef struct DynamicPaintCreateUVSurfaceData {
 } DynamicPaintCreateUVSurfaceData;
 
 static void dynamic_paint_create_uv_surface_direct_cb(
-    void *__restrict userdata, const int ty, const ParallelRangeTLS *__restrict UNUSED(tls))
+    void *__restrict userdata, const int ty, const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const DynamicPaintCreateUVSurfaceData *data = userdata;
 
@@ -2330,7 +2330,7 @@ static void dynamic_paint_create_uv_surface_direct_cb(
 }
 
 static void dynamic_paint_create_uv_surface_neighbor_cb(
-    void *__restrict userdata, const int ty, const ParallelRangeTLS *__restrict UNUSED(tls))
+    void *__restrict userdata, const int ty, const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const DynamicPaintCreateUVSurfaceData *data = userdata;
 
@@ -2948,7 +2948,7 @@ int dynamicPaint_createUVSurface(Scene *scene,
         .faceBB = faceBB,
     };
     {
-      ParallelRangeSettings settings;
+      TaskParallelSettings settings;
       BLI_parallel_range_settings_defaults(&settings);
       settings.use_threading = (h > 64 || tottri > 1000);
       BLI_task_parallel_range(0, h, &data, dynamic_paint_create_uv_surface_direct_cb, &settings);
@@ -2965,7 +2965,7 @@ int dynamicPaint_createUVSurface(Scene *scene,
      */
     data.active_points = &active_points;
     {
-      ParallelRangeSettings settings;
+      TaskParallelSettings settings;
       BLI_parallel_range_settings_defaults(&settings);
       settings.use_threading = (h > 64);
       BLI_task_parallel_range(0, h, &data, dynamic_paint_create_uv_surface_neighbor_cb, &settings);
@@ -3216,7 +3216,7 @@ typedef struct DynamicPaintOutputSurfaceImageData {
 } DynamicPaintOutputSurfaceImageData;
 
 static void dynamic_paint_output_surface_image_paint_cb(
-    void *__restrict userdata, const int index, const ParallelRangeTLS *__restrict UNUSED(tls))
+    void *__restrict userdata, const int index, const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const DynamicPaintOutputSurfaceImageData *data = userdata;
 
@@ -3238,7 +3238,7 @@ static void dynamic_paint_output_surface_image_paint_cb(
 }
 
 static void dynamic_paint_output_surface_image_displace_cb(
-    void *__restrict userdata, const int index, const ParallelRangeTLS *__restrict UNUSED(tls))
+    void *__restrict userdata, const int index, const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const DynamicPaintOutputSurfaceImageData *data = userdata;
 
@@ -3264,7 +3264,7 @@ static void dynamic_paint_output_surface_image_displace_cb(
 }
 
 static void dynamic_paint_output_surface_image_wave_cb(
-    void *__restrict userdata, const int index, const ParallelRangeTLS *__restrict UNUSED(tls))
+    void *__restrict userdata, const int index, const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const DynamicPaintOutputSurfaceImageData *data = userdata;
 
@@ -3288,7 +3288,7 @@ static void dynamic_paint_output_surface_image_wave_cb(
 }
 
 static void dynamic_paint_output_surface_image_wetmap_cb(
-    void *__restrict userdata, const int index, const ParallelRangeTLS *__restrict UNUSED(tls))
+    void *__restrict userdata, const int index, const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const DynamicPaintOutputSurfaceImageData *data = userdata;
 
@@ -3346,7 +3346,7 @@ void dynamicPaint_outputSurfaceImage(DynamicPaintSurface *surface,
     case MOD_DPAINT_SURFACE_T_PAINT:
       switch (output_layer) {
         case 0: {
-          ParallelRangeSettings settings;
+          TaskParallelSettings settings;
           BLI_parallel_range_settings_defaults(&settings);
           settings.use_threading = (sData->total_points > 10000);
           BLI_task_parallel_range(0,
@@ -3357,7 +3357,7 @@ void dynamicPaint_outputSurfaceImage(DynamicPaintSurface *surface,
           break;
         }
         case 1: {
-          ParallelRangeSettings settings;
+          TaskParallelSettings settings;
           BLI_parallel_range_settings_defaults(&settings);
           settings.use_threading = (sData->total_points > 10000);
           BLI_task_parallel_range(0,
@@ -3375,7 +3375,7 @@ void dynamicPaint_outputSurfaceImage(DynamicPaintSurface *surface,
     case MOD_DPAINT_SURFACE_T_DISPLACE:
       switch (output_layer) {
         case 0: {
-          ParallelRangeSettings settings;
+          TaskParallelSettings settings;
           BLI_parallel_range_settings_defaults(&settings);
           settings.use_threading = (sData->total_points > 10000);
           BLI_task_parallel_range(0,
@@ -3395,7 +3395,7 @@ void dynamicPaint_outputSurfaceImage(DynamicPaintSurface *surface,
     case MOD_DPAINT_SURFACE_T_WAVE:
       switch (output_layer) {
         case 0: {
-          ParallelRangeSettings settings;
+          TaskParallelSettings settings;
           BLI_parallel_range_settings_defaults(&settings);
           settings.use_threading = (sData->total_points > 10000);
           BLI_task_parallel_range(0,
@@ -3758,7 +3758,7 @@ typedef struct DynamicPaintBrushVelocityData {
 
 static void dynamic_paint_brush_velocity_compute_cb(void *__restrict userdata,
                                                     const int i,
-                                                    const ParallelRangeTLS *__restrict UNUSED(tls))
+                                                    const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const DynamicPaintBrushVelocityData *data = userdata;
 
@@ -3857,7 +3857,7 @@ static void dynamicPaint_brushMeshCalculateVelocity(Depsgraph *depsgraph,
       .prev_obmat = prev_obmat,
       .timescale = timescale,
   };
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = (numOfVerts_c > 10000);
   BLI_task_parallel_range(
@@ -3942,7 +3942,7 @@ typedef struct DynamicPaintPaintData {
  * Paint a brush object mesh to the surface
  */
 static void dynamic_paint_paint_mesh_cell_point_cb_ex(
-    void *__restrict userdata, const int id, const ParallelRangeTLS *__restrict UNUSED(tls))
+    void *__restrict userdata, const int id, const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const DynamicPaintPaintData *data = userdata;
 
@@ -4365,7 +4365,7 @@ static int dynamicPaint_paintMesh(Depsgraph *depsgraph,
               .brushVelocity = brushVelocity,
               .treeData = &treeData,
           };
-          ParallelRangeSettings settings;
+          TaskParallelSettings settings;
           BLI_parallel_range_settings_defaults(&settings);
           settings.use_threading = (grid->s_num[c_index] > 250);
           BLI_task_parallel_range(0,
@@ -4393,7 +4393,7 @@ static int dynamicPaint_paintMesh(Depsgraph *depsgraph,
  * Paint a particle system to the surface
  */
 static void dynamic_paint_paint_particle_cell_point_cb_ex(
-    void *__restrict userdata, const int id, const ParallelRangeTLS *__restrict UNUSED(tls))
+    void *__restrict userdata, const int id, const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const DynamicPaintPaintData *data = userdata;
 
@@ -4666,7 +4666,7 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface,
           .c_index = c_index,
           .treeData = tree,
       };
-      ParallelRangeSettings settings;
+      TaskParallelSettings settings;
       BLI_parallel_range_settings_defaults(&settings);
       settings.use_threading = (grid->s_num[c_index] > 250);
       BLI_task_parallel_range(0,
@@ -4685,7 +4685,7 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface,
 /* paint a single point of defined proximity radius to the surface */
 static void dynamic_paint_paint_single_point_cb_ex(void *__restrict userdata,
                                                    const int index,
-                                                   const ParallelRangeTLS *__restrict UNUSED(tls))
+                                                   const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const DynamicPaintPaintData *data = userdata;
 
@@ -4808,7 +4808,7 @@ static int dynamicPaint_paintSinglePoint(Depsgraph *depsgraph,
       .brushVelocity = &brushVel,
       .pointCoord = pointCoord,
   };
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = (sData->total_points > 1000);
   BLI_task_parallel_range(
@@ -4825,7 +4825,7 @@ static int dynamicPaint_paintSinglePoint(Depsgraph *depsgraph,
 
 static void dynamic_paint_prepare_adjacency_cb(void *__restrict userdata,
                                                const int index,
-                                               const ParallelRangeTLS *__restrict UNUSED(tls))
+                                               const TaskParallelTLS *__restrict UNUSED(tls))
 {
   PaintSurfaceData *sData = userdata;
   PaintBakeData *bData = sData->bData;
@@ -4870,7 +4870,7 @@ static void dynamicPaint_prepareAdjacencyData(DynamicPaintSurface *surface, cons
     return;
   }
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = (sData->total_points > 1000);
   BLI_task_parallel_range(
@@ -5085,7 +5085,7 @@ typedef struct DynamicPaintEffectData {
  */
 static void dynamic_paint_prepare_effect_cb(void *__restrict userdata,
                                             const int index,
-                                            const ParallelRangeTLS *__restrict UNUSED(tls))
+                                            const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const DynamicPaintEffectData *data = userdata;
 
@@ -5167,7 +5167,7 @@ static int dynamicPaint_prepareEffectStep(struct Depsgraph *depsgraph,
           .force = *force,
           .effectors = effectors,
       };
-      ParallelRangeSettings settings;
+      TaskParallelSettings settings;
       BLI_parallel_range_settings_defaults(&settings);
       settings.use_threading = (sData->total_points > 1000);
       BLI_task_parallel_range(
@@ -5207,7 +5207,7 @@ static int dynamicPaint_prepareEffectStep(struct Depsgraph *depsgraph,
  */
 static void dynamic_paint_effect_spread_cb(void *__restrict userdata,
                                            const int index,
-                                           const ParallelRangeTLS *__restrict UNUSED(tls))
+                                           const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const DynamicPaintEffectData *data = userdata;
 
@@ -5266,7 +5266,7 @@ static void dynamic_paint_effect_spread_cb(void *__restrict userdata,
 
 static void dynamic_paint_effect_shrink_cb(void *__restrict userdata,
                                            const int index,
-                                           const ParallelRangeTLS *__restrict UNUSED(tls))
+                                           const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const DynamicPaintEffectData *data = userdata;
 
@@ -5327,7 +5327,7 @@ static void dynamic_paint_effect_shrink_cb(void *__restrict userdata,
 
 static void dynamic_paint_effect_drip_cb(void *__restrict userdata,
                                          const int index,
-                                         const ParallelRangeTLS *__restrict UNUSED(tls))
+                                         const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const DynamicPaintEffectData *data = userdata;
 
@@ -5481,7 +5481,7 @@ static void dynamicPaint_doEffectStep(DynamicPaintSurface *surface,
         .prevPoint = prevPoint,
         .eff_scale = eff_scale,
     };
-    ParallelRangeSettings settings;
+    TaskParallelSettings settings;
     BLI_parallel_range_settings_defaults(&settings);
     settings.use_threading = (sData->total_points > 1000);
     BLI_task_parallel_range(
@@ -5503,7 +5503,7 @@ static void dynamicPaint_doEffectStep(DynamicPaintSurface *surface,
         .prevPoint = prevPoint,
         .eff_scale = eff_scale,
     };
-    ParallelRangeSettings settings;
+    TaskParallelSettings settings;
     BLI_parallel_range_settings_defaults(&settings);
     settings.use_threading = (sData->total_points > 1000);
     BLI_task_parallel_range(
@@ -5530,7 +5530,7 @@ static void dynamicPaint_doEffectStep(DynamicPaintSurface *surface,
         .force = force,
         .point_locks = point_locks,
     };
-    ParallelRangeSettings settings;
+    TaskParallelSettings settings;
     BLI_parallel_range_settings_defaults(&settings);
     settings.use_threading = (sData->total_points > 1000);
     BLI_task_parallel_range(
@@ -5542,7 +5542,7 @@ static void dynamicPaint_doEffectStep(DynamicPaintSurface *surface,
 
 static void dynamic_paint_border_cb(void *__restrict userdata,
                                     const int b_index,
-                                    const ParallelRangeTLS *__restrict UNUSED(tls))
+                                    const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const DynamicPaintEffectData *data = userdata;
 
@@ -5613,7 +5613,7 @@ static void dynamicPaint_doBorderStep(DynamicPaintSurface *surface)
       .surface = surface,
   };
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = (sData->adj_data->total_border > 1000);
   BLI_task_parallel_range(
@@ -5622,7 +5622,7 @@ static void dynamicPaint_doBorderStep(DynamicPaintSurface *surface)
 
 static void dynamic_paint_wave_step_cb(void *__restrict userdata,
                                        const int index,
-                                       const ParallelRangeTLS *__restrict UNUSED(tls))
+                                       const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const DynamicPaintEffectData *data = userdata;
 
@@ -5777,7 +5777,7 @@ static void dynamicPaint_doWaveStep(DynamicPaintSurface *surface, float timescal
         .damp_factor = damp_factor,
         .reset_wave = (ss == steps - 1),
     };
-    ParallelRangeSettings settings;
+    TaskParallelSettings settings;
     BLI_parallel_range_settings_defaults(&settings);
     settings.use_threading = (sData->total_points > 1000);
     BLI_task_parallel_range(0, sData->total_points, &data, dynamic_paint_wave_step_cb, &settings);
@@ -5802,7 +5802,7 @@ typedef struct DynamicPaintDissolveDryData {
 
 static void dynamic_paint_surface_pre_step_cb(void *__restrict userdata,
                                               const int index,
-                                              const ParallelRangeTLS *__restrict UNUSED(tls))
+                                              const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const DynamicPaintDissolveDryData *data = userdata;
 
@@ -5938,7 +5938,7 @@ typedef struct DynamicPaintGenerateBakeData {
 
 static void dynamic_paint_generate_bake_data_cb(void *__restrict userdata,
                                                 const int index,
-                                                const ParallelRangeTLS *__restrict UNUSED(tls))
+                                                const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const DynamicPaintGenerateBakeData *data = userdata;
 
@@ -6170,7 +6170,7 @@ static int dynamicPaint_generateBakeData(DynamicPaintSurface *surface,
       .do_velocity_data = do_velocity_data,
       .new_bdata = new_bdata,
   };
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = (sData->total_points > 1000);
   BLI_task_parallel_range(
@@ -6217,7 +6217,7 @@ static int dynamicPaint_doStep(Depsgraph *depsgraph,
         .surface = surface,
         .timescale = timescale,
     };
-    ParallelRangeSettings settings;
+    TaskParallelSettings settings;
     BLI_parallel_range_settings_defaults(&settings);
     settings.use_threading = (sData->total_points > 1000);
     BLI_task_parallel_range(
index b8178bec52f89c24ba42bc18fb0a47d0332a0987..83b354ffb4ae29d3cb7de2d26ae03fca06c81e16 100644 (file)
@@ -889,7 +889,7 @@ typedef struct LatticeDeformUserdata {
 
 static void lattice_deform_vert_task(void *__restrict userdata,
                                      const int index,
-                                     const ParallelRangeTLS *__restrict UNUSED(tls))
+                                     const TaskParallelTLS *__restrict UNUSED(tls))
 {
   const LatticeDeformUserdata *data = userdata;
 
@@ -948,7 +948,7 @@ void lattice_deform_verts(Object *laOb,
                                 .defgrp_index = defgrp_index,
                                 .fac = fac};
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.min_iter_per_thread = 32;
   BLI_task_parallel_range(0, numVerts, &data, lattice_deform_vert_task, &settings);
index 2ab5b69a022bfd7058f5e9816176be16ffb00042..e03903c05e496aebbe376dcbd95abfb23f3f01b9 100644 (file)
@@ -1462,7 +1462,7 @@ typedef struct MaskRasterizeBufferData {
 
 static void maskrasterize_buffer_cb(void *__restrict userdata,
                                     const int y,
-                                    const ParallelRangeTLS *__restrict UNUSED(tls))
+                                    const TaskParallelTLS *__restrict UNUSED(tls))
 {
   MaskRasterizeBufferData *data = userdata;
 
@@ -1503,7 +1503,7 @@ void BKE_maskrasterize_buffer(MaskRasterHandle *mr_handle,
       .width = width,
       .buffer = buffer,
   };
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = ((size_t)height * width > 10000);
   BLI_task_parallel_range(0, (int)height, &data, maskrasterize_buffer_cb, &settings);
index 17b22a6d095237e515e9e316864eab21b6dde850..e28d50cbde46b702dabca31ce194875d85e5e291 100644 (file)
@@ -220,7 +220,7 @@ typedef struct MeshCalcNormalsData {
 
 static void mesh_calc_normals_poly_cb(void *__restrict userdata,
                                       const int pidx,
-                                      const ParallelRangeTLS *__restrict UNUSED(tls))
+                                      const TaskParallelTLS *__restrict UNUSED(tls))
 {
   MeshCalcNormalsData *data = userdata;
   const MPoly *mp = &data->mpolys[pidx];
@@ -230,7 +230,7 @@ static void mesh_calc_normals_poly_cb(void *__restrict userdata,
 
 static void mesh_calc_normals_poly_prepare_cb(void *__restrict userdata,
                                               const int pidx,
-                                              const ParallelRangeTLS *__restrict UNUSED(tls))
+                                              const TaskParallelTLS *__restrict UNUSED(tls))
 {
   MeshCalcNormalsData *data = userdata;
   const MPoly *mp = &data->mpolys[pidx];
@@ -294,7 +294,7 @@ static void mesh_calc_normals_poly_prepare_cb(void *__restrict userdata,
 
 static void mesh_calc_normals_poly_finalize_cb(void *__restrict userdata,
                                                const int vidx,
-                                               const ParallelRangeTLS *__restrict UNUSED(tls))
+                                               const TaskParallelTLS *__restrict UNUSED(tls))
 {
   MeshCalcNormalsData *data = userdata;
 
@@ -321,7 +321,7 @@ void BKE_mesh_calc_normals_poly(MVert *mverts,
 {
   float(*pnors)[3] = r_polynors;
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.min_iter_per_thread = 1024;
 
index 29337ca9985c740a049ff7a9dff25c23c387350f..bbae1f4d3bc2825e53354188475c218329b8ae46 100644 (file)
@@ -1078,7 +1078,7 @@ typedef struct MultiresThreadedData {
 
 static void multires_disp_run_cb(void *__restrict userdata,
                                  const int pidx,
-                                 const ParallelRangeTLS *__restrict UNUSED(tls))
+                                 const TaskParallelTLS *__restrict UNUSED(tls))
 {
   MultiresThreadedData *tdata = userdata;
 
@@ -1230,7 +1230,7 @@ static void multiresModifier_disp_run(
     }
   }
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.min_iter_per_thread = CCG_TASK_LIMIT;
 
index 749cedb538871705cc1c2d6b6eefbadab5ededd4..d939267ac5ab512501312ba056daf9a59cd6421f 100644 (file)
@@ -955,7 +955,7 @@ typedef struct ReshapeFromCCGTaskData {
 
 static void reshape_from_ccg_task(void *__restrict userdata,
                                   const int coarse_poly_index,
-                                  const ParallelRangeTLS *__restrict UNUSED(tls))
+                                  const TaskParallelTLS *__restrict UNUSED(tls))
 {
   ReshapeFromCCGTaskData *data = userdata;
   const CCGKey *key = data->key;
@@ -1045,7 +1045,7 @@ bool multiresModifier_reshapeFromCCG(const int tot_level, Mesh *coarse_mesh, Sub
   MultiresPropagateData propagate_data;
   multires_reshape_propagate_prepare(&propagate_data, coarse_mesh, key.level, top_level);
   /* Threaded grids iteration. */
-  ParallelRangeSettings parallel_range_settings;
+  TaskParallelSettings parallel_range_settings;
   BLI_parallel_range_settings_defaults(&parallel_range_settings);
   BLI_task_parallel_range(
       0, coarse_mesh->totpoly, &data, reshape_from_ccg_task, &parallel_range_settings);
index b5df7d5fe9beaca09f0a8e5c750241b62a09258d..39fb668c8730e77742ad83f40f87eb2bfc999b04 100644 (file)
@@ -510,7 +510,7 @@ typedef struct OceanSimulateData {
 
 static void ocean_compute_htilda(void *__restrict userdata,
                                  const int i,
-                                 const ParallelRangeTLS *__restrict UNUSED(tls))
+                                 const TaskParallelTLS *__restrict UNUSED(tls))
 {
   OceanSimulateData *osd = userdata;
   const Ocean *o = osd->o;
@@ -779,7 +779,7 @@ void BKE_ocean_simulate(struct Ocean *o, float t, float scale, float chop_amount
    * but remains reasonably simple and should be OK most of the time. */
 
   /* compute a new htilda */
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = (o->_M > 16);
   BLI_task_parallel_range(0, o->_M, &osd, ocean_compute_htilda, &settings);
index 079a348745c4d1b119634bf05fcde87e572a419b..b80f64e347236f82b667579880afff9559e28c47 100644 (file)
@@ -3112,7 +3112,7 @@ typedef struct CacheEditrPathsIterData {
 
 static void psys_cache_edit_paths_iter(void *__restrict iter_data_v,
                                        const int iter,
-                                       const ParallelRangeTLS *__restrict UNUSED(tls))
+                                       const TaskParallelTLS *__restrict UNUSED(tls))
 {
   CacheEditrPathsIterData *iter_data = (CacheEditrPathsIterData *)iter_data_v;
   PTCacheEdit *edit = iter_data->edit;
@@ -3334,7 +3334,7 @@ void psys_cache_edit_paths(Depsgraph *depsgraph,
     iter_data.nosel_col[2] = (float)edit->nosel_col[2] / 255.0f;
   }
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.scheduling_mode = TASK_SCHEDULING_DYNAMIC;
   BLI_task_parallel_range(0, edit->totpoint, &iter_data, psys_cache_edit_paths_iter, &settings);
index 27722aab2d9379ad34b18e9c1c5978455f470f4a..e12537784f38c3afefdb4bc553b0150394ddc095 100644 (file)
@@ -3685,7 +3685,7 @@ typedef struct DynamicStepSolverTaskData {
 
 static void dynamics_step_sph_ddr_task_cb_ex(void *__restrict userdata,
                                              const int p,
-                                             const ParallelRangeTLS *__restrict tls)
+                                             const TaskParallelTLS *__restrict tls)
 {
   DynamicStepSolverTaskData *data = userdata;
   ParticleSimulationData *sim = data->sim;
@@ -3720,7 +3720,7 @@ static void dynamics_step_sph_ddr_task_cb_ex(void *__restrict userdata,
 }
 
 static void dynamics_step_sph_classical_basic_integrate_task_cb_ex(
-    void *__restrict userdata, const int p, const ParallelRangeTLS *__restrict UNUSED(tls))
+    void *__restrict userdata, const int p, const TaskParallelTLS *__restrict UNUSED(tls))
 {
   DynamicStepSolverTaskData *data = userdata;
   ParticleSimulationData *sim = data->sim;
@@ -3736,7 +3736,7 @@ static void dynamics_step_sph_classical_basic_integrate_task_cb_ex(
 }
 
 static void dynamics_step_sph_classical_calc_density_task_cb_ex(
-    void *__restrict userdata, const int p, const ParallelRangeTLS *__restrict tls)
+    void *__restrict userdata, const int p, const TaskParallelTLS *__restrict tls)
 {
   DynamicStepSolverTaskData *data = userdata;
   ParticleSimulationData *sim = data->sim;
@@ -3754,7 +3754,7 @@ static void dynamics_step_sph_classical_calc_density_task_cb_ex(
 }
 
 static void dynamics_step_sph_classical_integrate_task_cb_ex(
-    void *__restrict userdata, const int p, const ParallelRangeTLS *__restrict tls)
+    void *__restrict userdata, const int p, const TaskParallelTLS *__restrict tls)
 {
   DynamicStepSolverTaskData *data = userdata;
   ParticleSimulationData *sim = data->sim;
@@ -3963,7 +3963,7 @@ static void dynamics_step(ParticleSimulationData *sim, float cfra)
         /* Apply SPH forces using double-density relaxation algorithm
          * (Clavat et. al.) */
 
-        ParallelRangeSettings settings;
+        TaskParallelSettings settings;
         BLI_parallel_range_settings_defaults(&settings);
         settings.use_threading = (psys->totpart > 100);
         settings.userdata_chunk = &sphdata;
@@ -3980,7 +3980,7 @@ static void dynamics_step(ParticleSimulationData *sim, float cfra)
          * this algorithm is separated into distinct loops. */
 
         {
-          ParallelRangeSettings settings;
+          TaskParallelSettings settings;
           BLI_parallel_range_settings_defaults(&settings);
           settings.use_threading = (psys->totpart > 100);
           BLI_task_parallel_range(0,
@@ -3994,7 +3994,7 @@ static void dynamics_step(ParticleSimulationData *sim, float cfra)
         /* Note that we could avoid copying sphdata for each thread here (it's only read here),
          * but doubt this would gain us anything except confusion... */
         {
-          ParallelRangeSettings settings;
+          TaskParallelSettings settings;
           BLI_parallel_range_settings_defaults(&settings);
           settings.use_threading = (psys->totpart > 100);
           settings.userdata_chunk = &sphdata;
@@ -4008,7 +4008,7 @@ static void dynamics_step(ParticleSimulationData *sim, float cfra)
 
         /* do global forces & effectors */
         {
-          ParallelRangeSettings settings;
+          TaskParallelSettings settings;
           BLI_parallel_range_settings_defaults(&settings);
           settings.use_threading = (psys->totpart > 100);
           settings.userdata_chunk = &sphdata;
index ffc4ec65d4de410cd17546e972724aec339e0bee..860e2bdaa9327167c602ec9fc40e43bb56bb0fb3 100644 (file)
@@ -995,7 +995,7 @@ typedef struct PBVHUpdateData {
 
 static void pbvh_update_normals_accum_task_cb(void *__restrict userdata,
                                               const int n,
-                                              const ParallelRangeTLS *__restrict UNUSED(tls))
+                                              const TaskParallelTLS *__restrict UNUSED(tls))
 {
   PBVHUpdateData *data = userdata;
 
@@ -1045,7 +1045,7 @@ static void pbvh_update_normals_accum_task_cb(void *__restrict userdata,
 
 static void pbvh_update_normals_store_task_cb(void *__restrict userdata,
                                               const int n,
-                                              const ParallelRangeTLS *__restrict UNUSED(tls))
+                                              const TaskParallelTLS *__restrict UNUSED(tls))
 {
   PBVHUpdateData *data = userdata;
   PBVH *bvh = data->bvh;
@@ -1094,7 +1094,7 @@ static void pbvh_faces_update_normals(PBVH *bvh, PBVHNode **nodes, int totnode)
       .vnors = vnors,
   };
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = (totnode > PBVH_THREADED_LIMIT);
 
@@ -1107,7 +1107,7 @@ static void pbvh_faces_update_normals(PBVH *bvh, PBVHNode **nodes, int totnode)
 
 static void pbvh_update_BB_redraw_task_cb(void *__restrict userdata,
                                           const int n,
-                                          const ParallelRangeTLS *__restrict UNUSED(tls))
+                                          const TaskParallelTLS *__restrict UNUSED(tls))
 {
   PBVHUpdateData *data = userdata;
   PBVH *bvh = data->bvh;
@@ -1138,7 +1138,7 @@ void pbvh_update_BB_redraw(PBVH *bvh, PBVHNode **nodes, int totnode, int flag)
       .flag = flag,
   };
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = (totnode > PBVH_THREADED_LIMIT);
   BLI_task_parallel_range(0, totnode, &data, pbvh_update_BB_redraw_task_cb, &settings);
index 6a72b46a8f2af03eda0a910c2e4a698bf268a941..9b9fd33f52dcba2f23f088adcd0dcd22c1d43406 100644 (file)
@@ -344,7 +344,7 @@ void BKE_shrinkwrap_compute_boundary_data(struct Mesh *mesh)
  */
 static void shrinkwrap_calc_nearest_vertex_cb_ex(void *__restrict userdata,
                                                  const int i,
-                                                 const ParallelRangeTLS *__restrict tls)
+                                                 const TaskParallelTLS *__restrict tls)
 {
   ShrinkwrapCalcCBData *data = userdata;
 
@@ -416,7 +416,7 @@ static void shrinkwrap_calc_nearest_vertex(ShrinkwrapCalcData *calc)
       .calc = calc,
       .tree = calc->tree,
   };
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = (calc->numVerts > BKE_MESH_OMP_LIMIT);
   settings.userdata_chunk = &nearest;
@@ -510,7 +510,7 @@ bool BKE_shrinkwrap_project_normal(char options,
 
 static void shrinkwrap_calc_normal_projection_cb_ex(void *__restrict userdata,
                                                     const int i,
-                                                    const ParallelRangeTLS *__restrict tls)
+                                                    const TaskParallelTLS *__restrict tls)
 {
   ShrinkwrapCalcCBData *data = userdata;
 
@@ -703,7 +703,7 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc)
       .proj_axis = proj_axis,
       .local2aux = &local2aux,
   };
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = (calc->numVerts > BKE_MESH_OMP_LIMIT);
   settings.userdata_chunk = &hit;
@@ -1115,7 +1115,7 @@ void BKE_shrinkwrap_find_nearest_surface(struct ShrinkwrapTreeData *tree,
  */
 static void shrinkwrap_calc_nearest_surface_point_cb_ex(void *__restrict userdata,
                                                         const int i,
-                                                        const ParallelRangeTLS *__restrict tls)
+                                                        const TaskParallelTLS *__restrict tls)
 {
   ShrinkwrapCalcCBData *data = userdata;
 
@@ -1363,7 +1363,7 @@ static void shrinkwrap_calc_nearest_surface_point(ShrinkwrapCalcData *calc)
       .calc = calc,
       .tree = calc->tree,
   };
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = (calc->numVerts > BKE_MESH_OMP_LIMIT);
   settings.userdata_chunk = &nearest;
index bb8fd18ea58391ae34b51acae7efb75a85600769..1dcbf7615f7b7071a924efd43709e2e146b67f1f 100644 (file)
@@ -819,7 +819,7 @@ typedef struct ObstaclesFromDMData {
 
 static void obstacles_from_mesh_task_cb(void *__restrict userdata,
                                         const int z,
-                                        const ParallelRangeTLS *__restrict UNUSED(tls))
+                                        const TaskParallelTLS *__restrict UNUSED(tls))
 {
   ObstaclesFromDMData *data = userdata;
   SmokeDomainSettings *sds = data->sds;
@@ -974,7 +974,7 @@ static void obstacles_from_mesh(Object *coll_ob,
           .velocityZ = velocityZ,
           .num_obstacles = num_obstacles,
       };
-      ParallelRangeSettings settings;
+      TaskParallelSettings settings;
       BLI_parallel_range_settings_defaults(&settings);
       settings.scheduling_mode = TASK_SCHEDULING_DYNAMIC;
       BLI_task_parallel_range(
@@ -1328,7 +1328,7 @@ typedef struct EmitFromParticlesData {
 
 static void emit_from_particles_task_cb(void *__restrict userdata,
                                         const int z,
-                                        const ParallelRangeTLS *__restrict UNUSED(tls))
+                                        const TaskParallelTLS *__restrict UNUSED(tls))
 {
   EmitFromParticlesData *data = userdata;
   SmokeFlowSettings *sfs = data->sfs;
@@ -1567,7 +1567,7 @@ static void emit_from_particles(Object *flow_ob,
           .hr_smooth = hr_smooth,
       };
 
-      ParallelRangeSettings settings;
+      TaskParallelSettings settings;
       BLI_parallel_range_settings_defaults(&settings);
       settings.scheduling_mode = TASK_SCHEDULING_DYNAMIC;
       BLI_task_parallel_range(min[2], max[2], &data, emit_from_particles_task_cb, &settings);
@@ -1770,7 +1770,7 @@ typedef struct EmitFromDMData {
 
 static void emit_from_mesh_task_cb(void *__restrict userdata,
                                    const int z,
-                                   const ParallelRangeTLS *__restrict UNUSED(tls))
+                                   const TaskParallelTLS *__restrict UNUSED(tls))
 {
   EmitFromDMData *data = userdata;
   EmissionMap *em = data->em;
@@ -1975,7 +1975,7 @@ static void emit_from_mesh(
           .res = res,
       };
 
-      ParallelRangeSettings settings;
+      TaskParallelSettings settings;
       BLI_parallel_range_settings_defaults(&settings);
       settings.scheduling_mode = TASK_SCHEDULING_DYNAMIC;
       BLI_task_parallel_range(min[2], max[2], &data, emit_from_mesh_task_cb, &settings);
@@ -2893,7 +2893,7 @@ typedef struct UpdateEffectorsData {
 
 static void update_effectors_task_cb(void *__restrict userdata,
                                      const int x,
-                                     const ParallelRangeTLS *__restrict UNUSED(tls))
+                                     const TaskParallelTLS *__restrict UNUSED(tls))
 {
   UpdateEffectorsData *data = userdata;
   SmokeDomainSettings *sds = data->sds;
@@ -2967,7 +2967,7 @@ static void update_effectors(
     data.velocity_z = smoke_get_velocity_z(sds->fluid);
     data.obstacle = smoke_get_obstacle(sds->fluid);
 
-    ParallelRangeSettings settings;
+    TaskParallelSettings settings;
     BLI_parallel_range_settings_defaults(&settings);
     settings.scheduling_mode = TASK_SCHEDULING_DYNAMIC;
     BLI_task_parallel_range(0, sds->res[0], &data, update_effectors_task_cb, &settings);
index fac1e1dbe75dab3e15526bb1011d9a57291c8004..472fbd9ad186ee2eb10fbcd5a651772a5cda32bb 100644 (file)
@@ -267,7 +267,7 @@ static void subdiv_ccg_eval_special_grid(CCGEvalGridsData *data, const int face_
 
 static void subdiv_ccg_eval_grids_task(void *__restrict userdata_v,
                                        const int face_index,
-                                       const ParallelRangeTLS *__restrict UNUSED(tls))
+                                       const TaskParallelTLS *__restrict UNUSED(tls))
 {
   CCGEvalGridsData *data = userdata_v;
   SubdivCCG *subdiv_ccg = data->subdiv_ccg;
@@ -295,7 +295,7 @@ static bool subdiv_ccg_evaluate_grids(SubdivCCG *subdiv_ccg,
   data.mask_evaluator = mask_evaluator;
   data.material_flags_evaluator = material_flags_evaluator;
   /* Threaded grids evaluation. */
-  ParallelRangeSettings parallel_range_settings;
+  TaskParallelSettings parallel_range_settings;
   BLI_parallel_range_settings_defaults(&parallel_range_settings);
   BLI_task_parallel_range(
       0, num_faces, &data, subdiv_ccg_eval_grids_task, &parallel_range_settings);
@@ -747,7 +747,7 @@ static void subdiv_ccg_average_inner_face_normals(SubdivCCG *subdiv_ccg,
 
 static void subdiv_ccg_recalc_inner_normal_task(void *__restrict userdata_v,
                                                 const int grid_index,
-                                                const ParallelRangeTLS *__restrict tls_v)
+                                                const TaskParallelTLS *__restrict tls_v)
 {
   RecalcInnerNormalsData *data = userdata_v;
   RecalcInnerNormalsTLSData *tls = tls_v->userdata_chunk;
@@ -772,7 +772,7 @@ static void subdiv_ccg_recalc_inner_grid_normals(SubdivCCG *subdiv_ccg)
       .key = &key,
   };
   RecalcInnerNormalsTLSData tls_data = {NULL};
-  ParallelRangeSettings parallel_range_settings;
+  TaskParallelSettings parallel_range_settings;
   BLI_parallel_range_settings_defaults(&parallel_range_settings);
   parallel_range_settings.userdata_chunk = &tls_data;
   parallel_range_settings.userdata_chunk_size = sizeof(tls_data);
@@ -802,7 +802,7 @@ typedef struct RecalcModifiedInnerNormalsData {
 
 static void subdiv_ccg_recalc_modified_inner_normal_task(void *__restrict userdata_v,
                                                          const int face_index,
-                                                         const ParallelRangeTLS *__restrict tls_v)
+                                                         const TaskParallelTLS *__restrict tls_v)
 {
   RecalcModifiedInnerNormalsData *data = userdata_v;
   SubdivCCG *subdiv_ccg = data->subdiv_ccg;
@@ -838,7 +838,7 @@ static void subdiv_ccg_recalc_modified_inner_grid_normals(SubdivCCG *subdiv_ccg,
       .effected_ccg_faces = (SubdivCCGFace **)effected_faces,
   };
   RecalcInnerNormalsTLSData tls_data = {NULL};
-  ParallelRangeSettings parallel_range_settings;
+  TaskParallelSettings parallel_range_settings;
   BLI_parallel_range_settings_defaults(&parallel_range_settings);
   parallel_range_settings.userdata_chunk = &tls_data;
   parallel_range_settings.userdata_chunk_size = sizeof(tls_data);
@@ -991,7 +991,7 @@ static void subdiv_ccg_average_inner_face_grids(SubdivCCG *subdiv_ccg,
 
 static void subdiv_ccg_average_inner_grids_task(void *__restrict userdata_v,
                                                 const int face_index,
-                                                const ParallelRangeTLS *__restrict UNUSED(tls_v))
+                                                const TaskParallelTLS *__restrict UNUSED(tls_v))
 {
   AverageInnerGridsData *data = userdata_v;
   SubdivCCG *subdiv_ccg = data->subdiv_ccg;
@@ -1050,7 +1050,7 @@ static void subdiv_ccg_average_grids_boundary(SubdivCCG *subdiv_ccg,
 
 static void subdiv_ccg_average_grids_boundaries_task(void *__restrict userdata_v,
                                                      const int adjacent_edge_index,
-                                                     const ParallelRangeTLS *__restrict tls_v)
+                                                     const TaskParallelTLS *__restrict tls_v)
 {
   AverageGridsBoundariesData *data = userdata_v;
   AverageGridsBoundariesTLSData *tls = tls_v->userdata_chunk;
@@ -1097,7 +1097,7 @@ static void subdiv_ccg_average_grids_corners(SubdivCCG *subdiv_ccg,
 
 static void subdiv_ccg_average_grids_corners_task(void *__restrict userdata_v,
                                                   const int adjacent_vertex_index,
-                                                  const ParallelRangeTLS *__restrict UNUSED(tls_v))
+                                                  const TaskParallelTLS *__restrict UNUSED(tls_v))
 {
   AverageGridsCornerData *data = userdata_v;
   SubdivCCG *subdiv_ccg = data->subdiv_ccg;
@@ -1108,7 +1108,7 @@ static void subdiv_ccg_average_grids_corners_task(void *__restrict userdata_v,
 
 static void subdiv_ccg_average_all_boundaries(SubdivCCG *subdiv_ccg, CCGKey *key)
 {
-  ParallelRangeSettings parallel_range_settings;
+  TaskParallelSettings parallel_range_settings;
   BLI_parallel_range_settings_defaults(&parallel_range_settings);
   AverageGridsBoundariesData boundaries_data = {
       .subdiv_ccg = subdiv_ccg,
@@ -1127,7 +1127,7 @@ static void subdiv_ccg_average_all_boundaries(SubdivCCG *subdiv_ccg, CCGKey *key
 
 static void subdiv_ccg_average_all_corners(SubdivCCG *subdiv_ccg, CCGKey *key)
 {
-  ParallelRangeSettings parallel_range_settings;
+  TaskParallelSettings parallel_range_settings;
   BLI_parallel_range_settings_defaults(&parallel_range_settings);
   AverageGridsCornerData corner_data = {
       .subdiv_ccg = subdiv_ccg,
@@ -1150,7 +1150,7 @@ void BKE_subdiv_ccg_average_grids(SubdivCCG *subdiv_ccg)
 {
   CCGKey key;
   BKE_subdiv_ccg_key_top_level(&key, subdiv_ccg);
-  ParallelRangeSettings parallel_range_settings;
+  TaskParallelSettings parallel_range_settings;
   BLI_parallel_range_settings_defaults(&parallel_range_settings);
   /* Average inner boundaries of grids (within one face), across faces
    * from different face-corners. */
@@ -1175,7 +1175,7 @@ typedef struct StitchFacesInnerGridsData {
 static void subdiv_ccg_stitch_face_inner_grids_task(
     void *__restrict userdata_v,
     const int face_index,
-    const ParallelRangeTLS *__restrict UNUSED(tls_v))
+    const TaskParallelTLS *__restrict UNUSED(tls_v))
 {
   StitchFacesInnerGridsData *data = userdata_v;
   SubdivCCG *subdiv_ccg = data->subdiv_ccg;
@@ -1197,7 +1197,7 @@ void BKE_subdiv_ccg_average_stitch_faces(SubdivCCG *subdiv_ccg,
       .key = &key,
       .effected_ccg_faces = effected_faces,
   };
-  ParallelRangeSettings parallel_range_settings;
+  TaskParallelSettings parallel_range_settings;
   BLI_parallel_range_settings_defaults(&parallel_range_settings);
   BLI_task_parallel_range(0,
                           num_effected_faces,
index 98afbef6c0ac54351216d892cddc67c40662e5ed..c3f9bc3400cddef3f0cd22e39fa4d3d7b8a75444 100644 (file)
@@ -1681,7 +1681,7 @@ static void subdiv_foreach_polys(SubdivForeachTaskContext *ctx, void *tls, int p
 
 static void subdiv_foreach_loose_vertices_task(void *__restrict userdata,
                                                const int coarse_vertex_index,
-                                               const ParallelRangeTLS *__restrict tls)
+                                               const TaskParallelTLS *__restrict tls)
 {
   SubdivForeachTaskContext *ctx = userdata;
   if (BLI_BITMAP_TEST_BOOL(ctx->coarse_vertices_used_map, coarse_vertex_index)) {
@@ -1695,7 +1695,7 @@ static void subdiv_foreach_loose_vertices_task(void *__restrict userdata,
 
 static void subdiv_foreach_vertices_of_loose_edges_task(void *__restrict userdata,
                                                         const int coarse_edge_index,
-                                                        const ParallelRangeTLS *__restrict tls)
+                                                        const TaskParallelTLS *__restrict tls)
 {
   SubdivForeachTaskContext *ctx = userdata;
   if (BLI_BITMAP_TEST_BOOL(ctx->coarse_edges_used_map, coarse_edge_index)) {
@@ -1767,7 +1767,7 @@ static void subdiv_foreach_single_thread_tasks(SubdivForeachTaskContext *ctx)
 
 static void subdiv_foreach_task(void *__restrict userdata,
                                 const int poly_index,
-                                const ParallelRangeTLS *__restrict tls)
+                                const TaskParallelTLS *__restrict tls)
 {
   SubdivForeachTaskContext *ctx = userdata;
   /* Traverse hi-poly vertex coordinates and normals. */
@@ -1786,7 +1786,7 @@ static void subdiv_foreach_task(void *__restrict userdata,
 
 static void subdiv_foreach_boundary_edges_task(void *__restrict userdata,
                                                const int edge_index,
-                                               const ParallelRangeTLS *__restrict tls)
+                                               const TaskParallelTLS *__restrict tls)
 {
   SubdivForeachTaskContext *ctx = userdata;
   subdiv_foreach_boundary_edges(ctx, tls->userdata_chunk, edge_index);
@@ -1821,7 +1821,7 @@ bool BKE_subdiv_foreach_subdiv_geometry(Subdiv *subdiv,
   /* Run all the code which is not supposed to be run from threads. */
   subdiv_foreach_single_thread_tasks(&ctx);
   /* Threaded traversal of the rest of topology. */
-  ParallelRangeSettings parallel_range_settings;
+  TaskParallelSettings parallel_range_settings;
   BLI_parallel_range_settings_defaults(&parallel_range_settings);
   parallel_range_settings.userdata_chunk = context->user_data_tls;
   parallel_range_settings.userdata_chunk_size = context->user_data_tls_size;
index 4171c1aac4f96a9cac752886e394f1455c80f1bc..09a073e3ca6f2f3f9f45e968a36e8a054cc11533 100644 (file)
@@ -1459,7 +1459,7 @@ typedef struct CopyFinalLoopArrayData {
 
 static void copyFinalLoopArray_task_cb(void *__restrict userdata,
                                        const int iter,
-                                       const ParallelRangeTLS *__restrict UNUSED(tls))
+                                       const TaskParallelTLS *__restrict UNUSED(tls))
 {
   CopyFinalLoopArrayData *data = userdata;
   CCGDerivedMesh *ccgdm = data->ccgdm;
@@ -1536,7 +1536,7 @@ static void ccgDM_copyFinalLoopArray(DerivedMesh *dm, MLoop *mloop)
    */
   data.mloop_index = data.grid_size >= 5 ? 1 : 8;
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.min_iter_per_thread = 1;
 
index 8a474725b0cb550354ffdf9a2c275889db1d0d94..84855cf4b822781df17df5f3d271208fc821a89d 100644 (file)
@@ -377,7 +377,7 @@ AutoTrackContext *BKE_autotrack_context_new(MovieClip *clip,
 
 static void autotrack_context_step_cb(void *__restrict userdata,
                                       const int track,
-                                      const ParallelRangeTLS *__restrict UNUSED(tls))
+                                      const TaskParallelTLS *__restrict UNUSED(tls))
 {
   AutoTrackContext *context = userdata;
   const int frame_delta = context->backwards ? -1 : 1;
@@ -446,7 +446,7 @@ bool BKE_autotrack_context_step(AutoTrackContext *context)
   const int frame_delta = context->backwards ? -1 : 1;
   context->step_ok = false;
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = (context->num_tracks > 1);
   BLI_task_parallel_range(0, context->num_tracks, context, autotrack_context_step_cb, &settings);
index fa2399dd989658f3f190ded1a1fb4611eb6455e0..03229c654fb704b788449d4e2395ffd1b863ba4e 100644 (file)
@@ -1341,7 +1341,7 @@ typedef struct TrackingStabilizeFrameInterpolationData {
 } TrackingStabilizeFrameInterpolationData;
 
 static void tracking_stabilize_frame_interpolation_cb(
-    void *__restrict userdata, const int j, const ParallelRangeTLS *__restrict UNUSED(tls))
+    void *__restrict userdata, const int j, const TaskParallelTLS *__restrict UNUSED(tls))
 {
   TrackingStabilizeFrameInterpolationData *data = userdata;
   ImBuf *ibuf = data->ibuf;
@@ -1446,7 +1446,7 @@ ImBuf *BKE_tracking_stabilize_frame(
       .interpolation = interpolation,
   };
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = (tmpibuf->y > 128);
   BLI_task_parallel_range(
index 85680d8aae839d06b18f35b4bf19916c1cc32289..568d6c9a84a8ffcdf4a4ab3b82144b8279bd7443 100644 (file)
@@ -142,22 +142,23 @@ typedef enum eTaskSchedulingMode {
 } eTaskSchedulingMode;
 
 /* Per-thread specific data passed to the callback. */
-typedef struct ParallelRangeTLS {
+typedef struct TaskParallelTLS {
   /* Identifier of the thread who this data belongs to. */
   int thread_id;
   /* Copy of user-specifier chunk, which is copied from original chunk to all
    * worker threads. This is similar to OpenMP's firstprivate.
    */
   void *userdata_chunk;
-} ParallelRangeTLS;
+} TaskParallelTLS;
+
+typedef void (*TaskParallelFinalizeFunc)(void *__restrict userdata,
+                                         void *__restrict userdata_chunk);
 
 typedef void (*TaskParallelRangeFunc)(void *__restrict userdata,
                                       const int iter,
-                                      const ParallelRangeTLS *__restrict tls);
-typedef void (*TaskParallelRangeFuncFinalize)(void *__restrict userdata,
-                                              void *__restrict userdata_chunk);
+                                      const TaskParallelTLS *__restrict tls);
 
-typedef struct ParallelRangeSettings {
+typedef struct TaskParallelSettings {
   /* Whether caller allows to do threading of the particular range.
    * Usually set by some equation, which forces threading off when threading
    * overhead becomes higher than speed benefit.
@@ -175,7 +176,7 @@ typedef struct ParallelRangeSettings {
   /* Function called from calling thread once whole range have been
    * processed.
    */
-  TaskParallelRangeFuncFinalize func_finalize;
+  TaskParallelFinalizeFunc func_finalize;
   /* Minimum allowed number of range iterators to be handled by a single
    * thread. This allows to achieve following:
    * - Reduce amount of threading overhead.
@@ -187,15 +188,15 @@ typedef struct ParallelRangeSettings {
    * having a global use_threading switch based on just range size.
    */
   int min_iter_per_thread;
-} ParallelRangeSettings;
+} TaskParallelSettings;
 
-BLI_INLINE void BLI_parallel_range_settings_defaults(ParallelRangeSettings *settings);
+BLI_INLINE void BLI_parallel_range_settings_defaults(TaskParallelSettings *settings);
 
 void BLI_task_parallel_range(const int start,
                              const int stop,
                              void *userdata,
                              TaskParallelRangeFunc func,
-                             const ParallelRangeSettings *settings);
+                             const TaskParallelSettings *settings);
 
 typedef void (*TaskParallelListbaseFunc)(void *userdata, struct Link *iter, int index);
 void BLI_task_parallel_listbase(struct ListBase *listbase,
@@ -211,7 +212,7 @@ void BLI_task_parallel_mempool(struct BLI_mempool *mempool,
                                const bool use_threading);
 
 /* TODO(sergey): Think of a better place for this. */
-BLI_INLINE void BLI_parallel_range_settings_defaults(ParallelRangeSettings *settings)
+BLI_INLINE void BLI_parallel_range_settings_defaults(TaskParallelSettings *settings)
 {
   memset(settings, 0, sizeof(*settings));
   settings->use_threading = true;
index f43f55a352ba1df99f40519eb931dc99f1cfd169..f1811ff6e4f5043c633f13855cbc4d24523904f7 100644 (file)
@@ -700,7 +700,7 @@ typedef struct BVHDivNodesData {
 
 static void non_recursive_bvh_div_nodes_task_cb(void *__restrict userdata,
                                                 const int j,
-                                                const ParallelRangeTLS *__restrict UNUSED(tls))
+                                                const TaskParallelTLS *__restrict UNUSED(tls))
 {
   BVHDivNodesData *data = userdata;
 
@@ -841,14 +841,14 @@ static void non_recursive_bvh_div_nodes(const BVHTree *tree,
     cb_data.depth = depth;
 
     if (true) {
-      ParallelRangeSettings settings;
+      TaskParallelSettings settings;
       BLI_parallel_range_settings_defaults(&settings);
       settings.use_threading = (num_leafs > KDOPBVH_THREAD_LEAF_THRESHOLD);
       BLI_task_parallel_range(i, i_stop, &cb_data, non_recursive_bvh_div_nodes_task_cb, &settings);
     }
     else {
       /* Less hassle for debugging. */
-      ParallelRangeTLS tls = {0};
+      TaskParallelTLS tls = {0};
       for (int i_task = i; i_task < i_stop; i_task++) {
         non_recursive_bvh_div_nodes_task_cb(&cb_data, i_task, &tls);
       }
@@ -1195,7 +1195,7 @@ int BLI_bvhtree_overlap_thread_num(const BVHTree *tree)
 
 static void bvhtree_overlap_task_cb(void *__restrict userdata,
                                     const int j,
-                                    const ParallelRangeTLS *__restrict UNUSED(tls))
+                                    const TaskParallelTLS *__restrict UNUSED(tls))
 {
   BVHOverlapData_Thread *data = &((BVHOverlapData_Thread *)userdata)[j];
   BVHOverlapData_Shared *data_shared = data->shared;
@@ -1262,7 +1262,7 @@ BVHTreeOverlap *BLI_bvhtree_overlap(
     data[j].thread = j;
   }
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = (tree1->totleaf > KDOPBVH_THREAD_LEAF_THRESHOLD);
   BLI_task_parallel_range(0, thread_num, data, bvhtree_overlap_task_cb, &settings);
index 7c46112052032d3568001b16fd015bb2254536af..d4fcb32ce3716390a3fe1bc60f70f6a636a0c52f 100644 (file)
@@ -42,7 +42,7 @@ typedef struct CovarianceData {
 
 static void covariance_m_vn_ex_task_cb(void *__restrict userdata,
                                        const int a,
-                                       const ParallelRangeTLS *__restrict UNUSED(tls))
+                                       const TaskParallelTLS *__restrict UNUSED(tls))
 {
   CovarianceData *data = userdata;
   const float *cos_vn = data->cos_vn;
@@ -122,7 +122,7 @@ void BLI_covariance_m_vn_ex(const int n,
       .nbr_cos_vn = nbr_cos_vn,
   };
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = ((nbr_cos_vn * n * n) >= 10000);
   BLI_task_parallel_range(0, n * n, &data, covariance_m_vn_ex_task_cb, &settings);
index cc54fb6bd388aa9678b2d1ebbb5d2e8d25c9dbac..bea38a232ccc81436b603fbfeef7a4f31748241a 100644 (file)
@@ -1054,7 +1054,7 @@ typedef struct ParallelRangeState {
   int chunk_size;
 } ParallelRangeState;
 
-BLI_INLINE void task_parallel_range_calc_chunk_size(const ParallelRangeSettings *settings,
+BLI_INLINE void task_parallel_range_calc_chunk_size(const TaskParallelSettings *settings,
                                                     const int num_tasks,
                                                     ParallelRangeState *state)
 {
@@ -1112,7 +1112,7 @@ BLI_INLINE bool parallel_range_next_iter_get(ParallelRangeState *__restrict stat
 static void parallel_range_func(TaskPool *__restrict pool, void *userdata_chunk, int thread_id)
 {
   ParallelRangeState *__restrict state = BLI_task_pool_userdata(pool);
-  ParallelRangeTLS tls = {
+  TaskParallelTLS tls = {
       .thread_id = thread_id,
       .userdata_chunk = userdata_chunk,
   };
@@ -1128,7 +1128,7 @@ static void parallel_range_single_thread(const int start,
                                          int const stop,
                                          void *userdata,
                                          TaskParallelRangeFunc func,
-                                         const ParallelRangeSettings *settings)
+                                         const TaskParallelSettings *settings)
 {
   void *userdata_chunk = settings->userdata_chunk;
   const size_t userdata_chunk_size = settings->userdata_chunk_size;
@@ -1138,7 +1138,7 @@ static void parallel_range_single_thread(const int start,
     userdata_chunk_local = MALLOCA(userdata_chunk_size);
     memcpy(userdata_chunk_local, userdata_chunk, userdata_chunk_size);
   }
-  ParallelRangeTLS tls = {
+  TaskParallelTLS tls = {
       .thread_id = 0,
       .userdata_chunk = userdata_chunk_local,
   };
@@ -1161,7 +1161,7 @@ void BLI_task_parallel_range(const int start,
                              const int stop,
                              void *userdata,
                              TaskParallelRangeFunc func,
-                             const ParallelRangeSettings *settings)
+                             const TaskParallelSettings *settings)
 {
   TaskScheduler *task_scheduler;
   TaskPool *task_pool;
index c58521297ddca90eddbfc85220a7de348f38c20c..5aa67ad8c78fd42f023cbbb2e9b068a112bd5430 100644 (file)
@@ -461,7 +461,7 @@ typedef struct BMLoopInterpMultiresData {
 
 static void loop_interp_multires_cb(void *__restrict userdata,
                                     const int ix,
-                                    const ParallelRangeTLS *__restrict UNUSED(tls))
+                                    const TaskParallelTLS *__restrict UNUSED(tls))
 {
   BMLoopInterpMultiresData *data = userdata;
 
@@ -561,7 +561,7 @@ void BM_loop_interp_multires_ex(BMesh *UNUSED(bm),
       .res = res,
       .d = 1.0f / (float)(res - 1),
   };
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = (res > 5);
   BLI_task_parallel_range(0, res, &data, loop_interp_multires_cb, &settings);
index fc8a829b56b06ab21592496be6024201193fd955..59f0c8c1933da9dc2d038246dc738d2c7e6e07b0 100644 (file)
@@ -824,7 +824,7 @@ static void deg_graph_clear_id_recalc_flags(ID *id)
 
 static void deg_graph_clear_id_node_func(void *__restrict data_v,
                                          const int i,
-                                         const ParallelRangeTLS *__restrict /*tls*/)
+                                         const TaskParallelTLS *__restrict /*tls*/)
 {
   /* TODO: we clear original ID recalc flags here, but this may not work
    * correctly when there are multiple depsgraph with others still using
@@ -850,7 +850,7 @@ void DEG_ids_clear_recalc(Main *UNUSED(bmain), Depsgraph *depsgraph)
   }
   /* Go over all ID nodes nodes, clearing tags. */
   const int num_id_nodes = deg_graph->id_nodes.size();
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.min_iter_per_thread = 1024;
   BLI_task_parallel_range(0, num_id_nodes, deg_graph, deg_graph_clear_id_node_func, &settings);
index 950deee2b07ddafd01e5274bc2a2c7e70b2887c5..b2415c9e89d5d21ea5eaed4159489aacc1ca4dc9 100644 (file)
@@ -108,7 +108,7 @@ static bool check_operation_node_visible(OperationNode *op_node)
 
 static void calculate_pending_func(void *__restrict data_v,
                                    const int i,
-                                   const ParallelRangeTLS *__restrict /*tls*/)
+                                   const TaskParallelTLS *__restrict /*tls*/)
 {
   CalculatePendingData *data = (CalculatePendingData *)data_v;
   Depsgraph *graph = data->graph;
@@ -148,7 +148,7 @@ static void calculate_pending_parents(Depsgraph *graph)
   const int num_operations = graph->operations.size();
   CalculatePendingData data;
   data.graph = graph;
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.min_iter_per_thread = 1024;
   BLI_task_parallel_range(0, num_operations, &data, calculate_pending_func, &settings);
index e54adcd8655b070f26cebe58a94f6c7ced997d2f..8079a3df87936cea75b1410a21224100fe6547f8 100644 (file)
@@ -88,7 +88,7 @@ namespace {
 
 void flush_init_operation_node_func(void *__restrict data_v,
                                     const int i,
-                                    const ParallelRangeTLS *__restrict /*tls*/)
+                                    const TaskParallelTLS *__restrict /*tls*/)
 {
   Depsgraph *graph = (Depsgraph *)data_v;
   OperationNode *node = graph->operations[i];
@@ -97,7 +97,7 @@ void flush_init_operation_node_func(void *__restrict data_v,
 
 void flush_init_id_node_func(void *__restrict data_v,
                              const int i,
-                             const ParallelRangeTLS *__restrict /*tls*/)
+                             const TaskParallelTLS *__restrict /*tls*/)
 {
   Depsgraph *graph = (Depsgraph *)data_v;
   IDNode *id_node = graph->id_nodes[i];
@@ -111,14 +111,14 @@ BLI_INLINE void flush_prepare(Depsgraph *graph)
 {
   {
     const int num_operations = graph->operations.size();
-    ParallelRangeSettings settings;
+    TaskParallelSettings settings;
     BLI_parallel_range_settings_defaults(&settings);
     settings.min_iter_per_thread = 1024;
     BLI_task_parallel_range(0, num_operations, graph, flush_init_operation_node_func, &settings);
   }
   {
     const int num_id_nodes = graph->id_nodes.size();
-    ParallelRangeSettings settings;
+    TaskParallelSettings settings;
     BLI_parallel_range_settings_defaults(&settings);
     settings.min_iter_per_thread = 1024;
     BLI_task_parallel_range(0, num_id_nodes, graph, flush_init_id_node_func, &settings);
@@ -396,7 +396,7 @@ void deg_graph_flush_updates(Main *bmain, Depsgraph *graph)
 
 static void graph_clear_operation_func(void *__restrict data_v,
                                        const int i,
-                                       const ParallelRangeTLS *__restrict /*tls*/)
+                                       const TaskParallelTLS *__restrict /*tls*/)
 {
   Depsgraph *graph = (Depsgraph *)data_v;
   OperationNode *node = graph->operations[i];
@@ -411,7 +411,7 @@ void deg_graph_clear_tags(Depsgraph *graph)
   /* Go over all operation nodes, clearing tags. */
   {
     const int num_operations = graph->operations.size();
-    ParallelRangeSettings settings;
+    TaskParallelSettings settings;
     BLI_parallel_range_settings_defaults(&settings);
     settings.min_iter_per_thread = 1024;
     BLI_task_parallel_range(0, num_operations, graph, graph_clear_operation_func, &settings);
index 4e6022cf18c78afa818c0990ab585a456438b6d9..2f2516f2055f0bfde2904c5c1028abce6fc5d25d 100644 (file)
@@ -785,7 +785,7 @@ typedef struct KeyIterData {
 
 static void foreach_mouse_hit_key_iter(void *__restrict iter_data_v,
                                        const int iter,
-                                       const ParallelRangeTLS *__restrict UNUSED(tls))
+                                       const TaskParallelTLS *__restrict UNUSED(tls))
 {
   KeyIterData *iter_data = (KeyIterData *)iter_data_v;
   PEData *data = iter_data->data;
@@ -855,7 +855,7 @@ static void foreach_mouse_hit_key(PEData *data, ForHitKeyMatFunc func, int selec
   iter_data.selected = selected;
   iter_data.func = func;
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.scheduling_mode = TASK_SCHEDULING_DYNAMIC;
   BLI_task_parallel_range(0, edit->totpoint, &iter_data, foreach_mouse_hit_key_iter, &settings);
@@ -1152,7 +1152,7 @@ typedef struct DeflectEmitterIter {
 
 static void deflect_emitter_iter(void *__restrict iter_data_v,
                                  const int iter,
-                                 const ParallelRangeTLS *__restrict UNUSED(tls))
+                                 const TaskParallelTLS *__restrict UNUSED(tls))
 {
   DeflectEmitterIter *iter_data = (DeflectEmitterIter *)iter_data_v;
   PTCacheEdit *edit = iter_data->edit;
@@ -1246,7 +1246,7 @@ static void pe_deflect_emitter(Scene *scene, Object *ob, PTCacheEdit *edit)
   iter_data.dist = dist;
   iter_data.emitterdist = pset->emitterdist;
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.scheduling_mode = TASK_SCHEDULING_DYNAMIC;
   BLI_task_parallel_range(0, edit->totpoint, &iter_data, deflect_emitter_iter, &settings);
@@ -1258,7 +1258,7 @@ typedef struct ApplyLengthsIterData {
 
 static void apply_lengths_iter(void *__restrict iter_data_v,
                                const int iter,
-                               const ParallelRangeTLS *__restrict UNUSED(tls))
+                               const TaskParallelTLS *__restrict UNUSED(tls))
 {
   ApplyLengthsIterData *iter_data = (ApplyLengthsIterData *)iter_data_v;
   PTCacheEdit *edit = iter_data->edit;
@@ -1296,7 +1296,7 @@ static void PE_apply_lengths(Scene *scene, PTCacheEdit *edit)
   ApplyLengthsIterData iter_data;
   iter_data.edit = edit;
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.scheduling_mode = TASK_SCHEDULING_DYNAMIC;
   BLI_task_parallel_range(0, edit->totpoint, &iter_data, apply_lengths_iter, &settings);
@@ -1309,7 +1309,7 @@ typedef struct IterateLengthsIterData {
 
 static void iterate_lengths_iter(void *__restrict iter_data_v,
                                  const int iter,
-                                 const ParallelRangeTLS *__restrict UNUSED(tls))
+                                 const TaskParallelTLS *__restrict UNUSED(tls))
 {
   IterateLengthsIterData *iter_data = (IterateLengthsIterData *)iter_data_v;
   PTCacheEdit *edit = iter_data->edit;
@@ -1371,7 +1371,7 @@ static void pe_iterate_lengths(Scene *scene, PTCacheEdit *edit)
   iter_data.edit = edit;
   iter_data.pset = pset;
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.scheduling_mode = TASK_SCHEDULING_DYNAMIC;
   BLI_task_parallel_range(0, edit->totpoint, &iter_data, iterate_lengths_iter, &settings);
@@ -4116,7 +4116,7 @@ typedef struct BrushAddCountIterTLSData {
 
 static void brush_add_count_iter(void *__restrict iter_data_v,
                                  const int iter,
-                                 const ParallelRangeTLS *__restrict tls_v)
+                                 const TaskParallelTLS *__restrict tls_v)
 {
   BrushAddCountIterData *iter_data = (BrushAddCountIterData *)iter_data_v;
   Depsgraph *depsgraph = iter_data->depsgraph;
@@ -4272,7 +4272,7 @@ static int brush_add(const bContext *C, PEData *data, short number)
 
   BrushAddCountIterTLSData tls = {NULL};
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.scheduling_mode = TASK_SCHEDULING_DYNAMIC;
   settings.userdata_chunk = &tls;
index ac74afce79e07349a54811f1a6c8536a560b8478..576baf5794bb09ade150c39a191e3b05de2817ec 100644 (file)
@@ -148,7 +148,7 @@ typedef struct LoadTexData {
 
 static void load_tex_task_cb_ex(void *__restrict userdata,
                                 const int j,
-                                const ParallelRangeTLS *__restrict tls)
+                                const TaskParallelTLS *__restrict tls)
 {
   LoadTexData *data = userdata;
   Brush *br = data->br;
@@ -328,7 +328,7 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima
         .radius = radius,
     };
 
-    ParallelRangeSettings settings;
+    TaskParallelSettings settings;
     BLI_parallel_range_settings_defaults(&settings);
     BLI_task_parallel_range(0, size, &data, load_tex_task_cb_ex, &settings);
 
@@ -385,7 +385,7 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima
 
 static void load_tex_cursor_task_cb(void *__restrict userdata,
                                     const int j,
-                                    const ParallelRangeTLS *__restrict UNUSED(tls))
+                                    const TaskParallelTLS *__restrict UNUSED(tls))
 {
   LoadTexData *data = userdata;
   Brush *br = data->br;
@@ -468,7 +468,7 @@ static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom)
         .size = size,
     };
 
-    ParallelRangeSettings settings;
+    TaskParallelSettings settings;
     BLI_parallel_range_settings_defaults(&settings);
     BLI_task_parallel_range(0, size, &data, load_tex_cursor_task_cb, &settings);
 
index 474d3a8cebadd977b7ce50221096287e7c20b764..8f1156295a3a68c53bc71dee8d919e3d9470148b 100644 (file)
@@ -1251,7 +1251,7 @@ typedef struct Paint2DForeachData {
 
 static void paint_2d_op_foreach_do(void *__restrict data_v,
                                    const int iter,
-                                   const ParallelRangeTLS *__restrict UNUSED(tls))
+                                   const TaskParallelTLS *__restrict UNUSED(tls))
 {
   Paint2DForeachData *data = (Paint2DForeachData *)data_v;
   paint_2d_do_making_brush(data->s,
@@ -1360,7 +1360,7 @@ static int paint_2d_op(void *state,
         data.tilex = tilex;
         data.tilew = tilew;
 
-        ParallelRangeSettings settings;
+        TaskParallelSettings settings;
         BLI_parallel_range_settings_defaults(&settings);
         BLI_task_parallel_range(tiley, tileh + 1, &data, paint_2d_op_foreach_do, &settings);
       }
index f60ea8410ef59585e8bd1d33a700b522bdec868e..c7e2b008d1f09c157092d1ddde94486ea61ee59c 100644 (file)
@@ -101,7 +101,7 @@ typedef struct MaskTaskData {
 
 static void mask_flood_fill_task_cb(void *__restrict userdata,
                                     const int i,
-                                    const ParallelRangeTLS *__restrict UNUSED(tls))
+                                    const TaskParallelTLS *__restrict UNUSED(tls))
 {
   MaskTaskData *data = userdata;
 
@@ -159,7 +159,7 @@ static int mask_flood_fill_exec(bContext *C, wmOperator *op)
       .value = value,
   };
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT);
   BLI_task_parallel_range(
@@ -243,7 +243,7 @@ static void flip_plane(float out[4], const float in[4], const char symm)
 
 static void mask_box_select_task_cb(void *__restrict userdata,
                                     const int i,
-                                    const ParallelRangeTLS *__restrict UNUSED(tls))
+                                    const TaskParallelTLS *__restrict UNUSED(tls))
 {
   MaskTaskData *data = userdata;
 
@@ -328,7 +328,7 @@ bool ED_sculpt_mask_box_select(struct bContext *C, ViewContext *vc, const rcti *
           .clip_planes_final = clip_planes_final,
       };
 
-      ParallelRangeSettings settings;
+      TaskParallelSettings settings;
       BLI_parallel_range_settings_defaults(&settings);
       settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) &&
                                 totnode > SCULPT_THREADED_LIMIT);
@@ -405,7 +405,7 @@ static void mask_lasso_px_cb(int x, int x_end, int y, void *user_data)
 
 static void mask_gesture_lasso_task_cb(void *__restrict userdata,
                                        const int i,
-                                       const ParallelRangeTLS *__restrict UNUSED(tls))
+                                       const TaskParallelTLS *__restrict UNUSED(tls))
 {
   LassoMaskData *lasso_data = userdata;
   MaskTaskData *data = &lasso_data->task_data;
@@ -515,7 +515,7 @@ static int paint_mask_gesture_lasso_exec(bContext *C, wmOperator *op)
         data.task_data.mode = mode;
         data.task_data.value = value;
 
-        ParallelRangeSettings settings;
+        TaskParallelSettings settings;
         BLI_parallel_range_settings_defaults(&settings);
         settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) &&
                                   (totnode > SCULPT_THREADED_LIMIT));
index 980b043bf8b6b7e61ca0ecb2c5ba1c13c3e118fe..47fa2872ff964593338558e22aff56388b4640cf 100644 (file)
@@ -1713,7 +1713,7 @@ static float wpaint_get_active_weight(const MDeformVert *dv, const WeightPaintIn
 
 static void do_wpaint_precompute_weight_cb_ex(void *__restrict userdata,
                                               const int n,
-                                              const ParallelRangeTLS *__restrict UNUSED(tls))
+                                              const TaskParallelTLS *__restrict UNUSED(tls))
 {
   SculptThreadedTaskData *data = userdata;
   const MDeformVert *dv = &data->me->dvert[n];
@@ -1737,7 +1737,7 @@ static void precompute_weight_values(
       .me = me,
   };
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   BLI_task_parallel_range(0, me->totvert, &data, do_wpaint_precompute_weight_cb_ex, &settings);
 
@@ -1746,7 +1746,7 @@ static void precompute_weight_values(
 
 static void do_wpaint_brush_blur_task_cb_ex(void *__restrict userdata,
                                             const int n,
-                                            const ParallelRangeTLS *__restrict UNUSED(tls))
+                                            const TaskParallelTLS *__restrict UNUSED(tls))
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -1838,7 +1838,7 @@ static void do_wpaint_brush_blur_task_cb_ex(void *__restrict userdata,
 
 static void do_wpaint_brush_smear_task_cb_ex(void *__restrict userdata,
                                              const int n,
-                                             const ParallelRangeTLS *__restrict UNUSED(tls))
+                                             const TaskParallelTLS *__restrict UNUSED(tls))
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -1949,7 +1949,7 @@ static void do_wpaint_brush_smear_task_cb_ex(void *__restrict userdata,
 
 static void do_wpaint_brush_draw_task_cb_ex(void *__restrict userdata,
                                             const int n,
-                                            const ParallelRangeTLS *__restrict UNUSED(tls))
+                                            const TaskParallelTLS *__restrict UNUSED(tls))
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -2022,7 +2022,7 @@ static void do_wpaint_brush_draw_task_cb_ex(void *__restrict userdata,
 }
 
 static void do_wpaint_brush_calc_average_weight_cb_ex(
-    void *__restrict userdata, const int n, const ParallelRangeTLS *__restrict UNUSED(tls))
+    void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls))
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -2078,7 +2078,7 @@ static void calculate_average_weight(SculptThreadedTaskData *data,
   struct WPaintAverageAccum *accum = MEM_mallocN(sizeof(*accum) * totnode, __func__);
   data->custom_data = accum;
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = ((data->sd->flags & SCULPT_USE_OPENMP) &&
                             totnode > SCULPT_THREADED_LIMIT);
@@ -2127,7 +2127,7 @@ static void wpaint_paint_leaves(bContext *C,
   /* Use this so average can modify its weight without touching the brush. */
   data.strength = BKE_brush_weight_get(scene, brush);
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   /* NOTE: current mirroring code cannot be run in parallel */
   settings.use_threading = !(me->editflag & ME_EDIT_MIRROR_X);
@@ -2706,7 +2706,7 @@ static bool vpaint_stroke_test_start(bContext *C, struct wmOperator *op, const f
 }
 
 static void do_vpaint_brush_calc_average_color_cb_ex(
-    void *__restrict userdata, const int n, const ParallelRangeTLS *__restrict UNUSED(tls))
+    void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls))
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -2772,7 +2772,7 @@ static float tex_color_alpha_ubyte(SculptThreadedTaskData *data,
 
 static void do_vpaint_brush_draw_task_cb_ex(void *__restrict userdata,
                                             const int n,
-                                            const ParallelRangeTLS *__restrict UNUSED(tls))
+                                            const TaskParallelTLS *__restrict UNUSED(tls))
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -2871,7 +2871,7 @@ static void do_vpaint_brush_draw_task_cb_ex(void *__restrict userdata,
 
 static void do_vpaint_brush_blur_task_cb_ex(void *__restrict userdata,
                                             const int n,
-                                            const ParallelRangeTLS *__restrict UNUSED(tls))
+                                            const TaskParallelTLS *__restrict UNUSED(tls))
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -2989,7 +2989,7 @@ static void do_vpaint_brush_blur_task_cb_ex(void *__restrict userdata,
 
 static void do_vpaint_brush_smear_task_cb_ex(void *__restrict userdata,
                                              const int n,
-                                             const ParallelRangeTLS *__restrict UNUSED(tls))
+                                             const TaskParallelTLS *__restrict UNUSED(tls))
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -3139,7 +3139,7 @@ static void calculate_average_color(SculptThreadedTaskData *data,
   struct VPaintAverageAccum *accum = MEM_mallocN(sizeof(*accum) * totnode, __func__);
   data->custom_data = accum;
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   BLI_task_parallel_range(0, totnode, data, do_vpaint_brush_calc_average_color_cb_ex, &settings);
 
@@ -3185,7 +3185,7 @@ static void vpaint_paint_leaves(bContext *C,
       .lcol = (uint *)me->mloopcol,
       .me = me,
   };
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   switch ((eBrushVertexPaintTool)brush->vertexpaint_tool) {
     case VPAINT_TOOL_AVERAGE:
index 173d6ed50850c55590dd296449a94def9ae749b3..4b35fdbd2ed46c880ceadd8707d6cad4d0a44863 100644 (file)
@@ -368,7 +368,7 @@ static bool sculpt_stroke_is_dynamic_topology(const SculptSession *ss, const Bru
 
 static void paint_mesh_restore_co_task_cb(void *__restrict userdata,
                                           const int n,
-                                          const ParallelRangeTLS *__restrict UNUSED(tls))
+                                          const TaskParallelTLS *__restrict UNUSED(tls))
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -438,7 +438,7 @@ static void paint_mesh_restore_co(Sculpt *sd, Object *ob)
       .nodes = nodes,
   };
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && !ss->bm &&
                             totnode > SCULPT_THREADED_LIMIT);
@@ -801,7 +801,7 @@ static float calc_symmetry_feather(Sculpt *sd, StrokeCache *cache)
 
 static void calc_area_normal_and_center_task_cb(void *__restrict userdata,
                                                 const int n,
-                                                const ParallelRangeTLS *__restrict UNUSED(tls))
+                                                const TaskParallelTLS *__restrict UNUSED(tls))
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -961,7 +961,7 @@ static void calc_area_center(
   };
   BLI_mutex_init(&data.mutex);
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT);
   BLI_task_parallel_range(0, totnode, &data, calc_area_normal_and_center_task_cb, &settings);
@@ -1018,7 +1018,7 @@ void sculpt_pbvh_calc_area_normal(const Brush *brush,
   };
   BLI_mutex_init(&data.mutex);
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = use_threading;
   BLI_task_parallel_range(0, totnode, &data, calc_area_normal_and_center_task_cb, &settings);
@@ -1063,7 +1063,7 @@ static void calc_area_normal_and_center(
   };
   BLI_mutex_init(&data.mutex);
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT);
   BLI_task_parallel_range(0, totnode, &data, calc_area_normal_and_center_task_cb, &settings);
@@ -1758,7 +1758,7 @@ typedef struct {
 
 static void do_smooth_brush_mesh_task_cb_ex(void *__restrict userdata,
                                             const int n,
-                                            const ParallelRangeTLS *__restrict tls)
+                                            const TaskParallelTLS *__restrict tls)
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -1813,7 +1813,7 @@ static void do_smooth_brush_mesh_task_cb_ex(void *__restrict userdata,
 
 static void do_smooth_brush_bmesh_task_cb_ex(void *__restrict userdata,
                                              const int n,
-                                             const ParallelRangeTLS *__restrict tls)
+                                             const TaskParallelTLS *__restrict tls)
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -1868,7 +1868,7 @@ static void do_smooth_brush_bmesh_task_cb_ex(void *__restrict userdata,
 
 static void do_topology_rake_bmesh_task_cb_ex(void *__restrict userdata,
                                               const int n,
-                                              const ParallelRangeTLS *__restrict tls)
+                                              const TaskParallelTLS *__restrict tls)
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -1925,7 +1925,7 @@ static void do_topology_rake_bmesh_task_cb_ex(void *__restrict userdata,
 
 static void do_smooth_brush_multires_task_cb_ex(void *__restrict userdata,
                                                 const int n,
-                                                const ParallelRangeTLS *__restrict tls)
+                                                const TaskParallelTLS *__restrict tls)
 {
   SculptThreadedTaskData *data = userdata;
   SculptDoBrushSmoothGridDataChunk *data_chunk = tls->userdata_chunk;
@@ -2115,7 +2115,7 @@ static void smooth(Sculpt *sd,
         .strength = strength,
     };
 
-    ParallelRangeSettings settings;
+    TaskParallelSettings settings;
     BLI_parallel_range_settings_defaults(&settings);
     settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT);
 
@@ -2175,7 +2175,7 @@ static void bmesh_topology_rake(
         .nodes = nodes,
         .strength = factor,
     };
-    ParallelRangeSettings settings;
+    TaskParallelSettings settings;
     BLI_parallel_range_settings_defaults(&settings);
     settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT);
 
@@ -2191,7 +2191,7 @@ static void do_smooth_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
 
 static void do_mask_brush_draw_task_cb_ex(void *__restrict userdata,
                                           const int n,
-                                          const ParallelRangeTLS *__restrict tls)
+                                          const TaskParallelTLS *__restrict tls)
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -2233,7 +2233,7 @@ static void do_mask_brush_draw(Sculpt *sd, Object *ob, PBVHNode **nodes, int tot
       .nodes = nodes,
   };
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT);
   BLI_task_parallel_range(0, totnode, &data, do_mask_brush_draw_task_cb_ex, &settings);
@@ -2256,7 +2256,7 @@ static void do_mask_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
 
 static void do_draw_brush_task_cb_ex(void *__restrict userdata,
                                      const int n,
-                                     const ParallelRangeTLS *__restrict tls)
+                                     const TaskParallelTLS *__restrict tls)
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -2320,7 +2320,7 @@ static void do_draw_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
       .offset = offset,
   };
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT);
   BLI_task_parallel_range(0, totnode, &data, do_draw_brush_task_cb_ex, &settings);
@@ -2331,7 +2331,7 @@ static void do_draw_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
  */
 static void do_crease_brush_task_cb_ex(void *__restrict userdata,
                                        const int n,
-                                       const ParallelRangeTLS *__restrict tls)
+                                       const TaskParallelTLS *__restrict tls)
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -2436,7 +2436,7 @@ static void do_crease_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
       .flippedbstrength = flippedbstrength,
   };
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT);
   BLI_task_parallel_range(0, totnode, &data, do_crease_brush_task_cb_ex, &settings);
@@ -2444,7 +2444,7 @@ static void do_crease_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
 
 static void do_pinch_brush_task_cb_ex(void *__restrict userdata,
                                       const int n,
-                                      const ParallelRangeTLS *__restrict tls)
+                                      const TaskParallelTLS *__restrict tls)
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -2498,7 +2498,7 @@ static void do_pinch_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
       .nodes = nodes,
   };
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT);
   BLI_task_parallel_range(0, totnode, &data, do_pinch_brush_task_cb_ex, &settings);
@@ -2506,7 +2506,7 @@ static void do_pinch_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
 
 static void do_grab_brush_task_cb_ex(void *__restrict userdata,
                                      const int n,
-                                     const ParallelRangeTLS *__restrict tls)
+                                     const TaskParallelTLS *__restrict tls)
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -2570,7 +2570,7 @@ static void do_grab_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
       .grab_delta = grab_delta,
   };
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT);
   BLI_task_parallel_range(0, totnode, &data, do_grab_brush_task_cb_ex, &settings);
@@ -2578,7 +2578,7 @@ static void do_grab_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
 
 static void do_nudge_brush_task_cb_ex(void *__restrict userdata,
                                       const int n,
-                                      const ParallelRangeTLS *__restrict tls)
+                                      const TaskParallelTLS *__restrict tls)
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -2637,7 +2637,7 @@ static void do_nudge_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
       .cono = cono,
   };
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT);
   BLI_task_parallel_range(0, totnode, &data, do_nudge_brush_task_cb_ex, &settings);
@@ -2645,7 +2645,7 @@ static void do_nudge_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
 
 static void do_snake_hook_brush_task_cb_ex(void *__restrict userdata,
                                            const int n,
-                                           const ParallelRangeTLS *__restrict tls)
+                                           const TaskParallelTLS *__restrict tls)
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -2758,7 +2758,7 @@ static void do_snake_hook_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int to
       .grab_delta = grab_delta,
   };
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT);
   BLI_task_parallel_range(0, totnode, &data, do_snake_hook_brush_task_cb_ex, &settings);
@@ -2766,7 +2766,7 @@ static void do_snake_hook_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int to
 
 static void do_thumb_brush_task_cb_ex(void *__restrict userdata,
                                       const int n,
-                                      const ParallelRangeTLS *__restrict tls)
+                                      const TaskParallelTLS *__restrict tls)
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -2830,7 +2830,7 @@ static void do_thumb_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
       .cono = cono,
   };
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT);
   BLI_task_parallel_range(0, totnode, &data, do_thumb_brush_task_cb_ex, &settings);
@@ -2838,7 +2838,7 @@ static void do_thumb_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
 
 static void do_rotate_brush_task_cb_ex(void *__restrict userdata,
                                        const int n,
-                                       const ParallelRangeTLS *__restrict tls)
+                                       const TaskParallelTLS *__restrict tls)
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -2903,7 +2903,7 @@ static void do_rotate_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
       .angle = angle,
   };
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT);
   BLI_task_parallel_range(0, totnode, &data, do_rotate_brush_task_cb_ex, &settings);
@@ -2911,7 +2911,7 @@ static void do_rotate_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
 
 static void do_layer_brush_task_cb_ex(void *__restrict userdata,
                                       const int n,
-                                      const ParallelRangeTLS *__restrict tls)
+                                      const TaskParallelTLS *__restrict tls)
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -3000,7 +3000,7 @@ static void do_layer_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
   };
   BLI_mutex_init(&data.mutex);
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT);
   BLI_task_parallel_range(0, totnode, &data, do_layer_brush_task_cb_ex, &settings);
@@ -3010,7 +3010,7 @@ static void do_layer_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
 
 static void do_inflate_brush_task_cb_ex(void *__restrict userdata,
                                         const int n,
-                                        const ParallelRangeTLS *__restrict tls)
+                                        const TaskParallelTLS *__restrict tls)
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -3068,7 +3068,7 @@ static void do_inflate_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totno
       .nodes = nodes,
   };
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT);
   BLI_task_parallel_range(0, totnode, &data, do_inflate_brush_task_cb_ex, &settings);
@@ -3184,7 +3184,7 @@ static float get_offset(Sculpt *sd, SculptSession *ss)
 
 static void do_flatten_brush_task_cb_ex(void *__restrict userdata,
                                         const int n,
-                                        const ParallelRangeTLS *__restrict tls)
+                                        const TaskParallelTLS *__restrict tls)
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -3266,7 +3266,7 @@ static void do_flatten_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totno
       .area_co = area_co,
   };
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT);
   BLI_task_parallel_range(0, totnode, &data, do_flatten_brush_task_cb_ex, &settings);
@@ -3274,7 +3274,7 @@ static void do_flatten_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totno
 
 static void do_clay_brush_task_cb_ex(void *__restrict userdata,
                                      const int n,
-                                     const ParallelRangeTLS *__restrict tls)
+                                     const TaskParallelTLS *__restrict tls)
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -3364,7 +3364,7 @@ static void do_clay_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
       .area_co = area_co,
   };
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT);
   BLI_task_parallel_range(0, totnode, &data, do_clay_brush_task_cb_ex, &settings);
@@ -3372,7 +3372,7 @@ static void do_clay_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
 
 static void do_clay_strips_brush_task_cb_ex(void *__restrict userdata,
                                             const int n,
-                                            const ParallelRangeTLS *__restrict tls)
+                                            const TaskParallelTLS *__restrict tls)
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -3494,7 +3494,7 @@ static void do_clay_strips_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int t
       .mat = mat,
   };
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT);
   BLI_task_parallel_range(0, totnode, &data, do_clay_strips_brush_task_cb_ex, &settings);
@@ -3502,7 +3502,7 @@ static void do_clay_strips_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int t
 
 static void do_fill_brush_task_cb_ex(void *__restrict userdata,
                                      const int n,
-                                     const ParallelRangeTLS *__restrict tls)
+                                     const TaskParallelTLS *__restrict tls)
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -3587,7 +3587,7 @@ static void do_fill_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
       .area_co = area_co,
   };
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT);
   BLI_task_parallel_range(0, totnode, &data, do_fill_brush_task_cb_ex, &settings);
@@ -3595,7 +3595,7 @@ static void do_fill_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
 
 static void do_scrape_brush_task_cb_ex(void *__restrict userdata,
                                        const int n,
-                                       const ParallelRangeTLS *__restrict tls)
+                                       const TaskParallelTLS *__restrict tls)
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -3679,7 +3679,7 @@ static void do_scrape_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
       .area_co = area_co,
   };
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT);
   BLI_task_parallel_range(0, totnode, &data, do_scrape_brush_task_cb_ex, &settings);
@@ -3687,7 +3687,7 @@ static void do_scrape_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
 
 static void do_gravity_task_cb_ex(void *__restrict userdata,
                                   const int n,
-                                  const ParallelRangeTLS *__restrict tls)
+                                  const TaskParallelTLS *__restrict tls)
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -3748,7 +3748,7 @@ static void do_gravity(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode, fl
       .offset = offset,
   };
 
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT);
   BLI_task_parallel_range(0, totnode, &data, do_gravity_task_cb_ex, &settings);
@@ -3862,7 +3862,7 @@ static void sculpt_topology_update(Sculpt *sd,
 
 static void do_brush_action_task_cb(void *__restrict userdata,
                                     const int n,
-                                    const ParallelRangeTLS *__restrict UNUSED(tls))
+                                    const TaskParallelTLS *__restrict UNUSED(tls))
 {
   SculptThreadedTaskData *data = userdata;
 
@@ -3896,7 +3896,7 @@ static void do_brush_action(Sculpt *sd, Object *ob, Brush *brush, UnifiedPaintSe
         .nodes = nodes,
     };
 
-    ParallelRangeSettings settings;
+    TaskParallelSettings settings;
     BLI_parallel_range_settings_defaults(&settings);
     settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT);
     BLI_task_parallel_range(0, totnode, &task_data, do_brush_action_task_cb, &settings);
@@ -4021,7 +4021,7 @@ static void sculpt_flush_pbvhvert_deform(Object *ob, PBVHVertexIter *vd)
 
 static void sculpt_combine_proxies_task_cb(void *__restrict userdata,
                                            const int n,
-                                           const ParallelRangeTLS *__restrict UNUSED(tls))
+                                           const TaskParallelTLS *__restrict UNUSED(tls))
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -4093,7 +4093,7 @@ static void sculpt_combine_proxies(Sculpt *sd, Object *ob)
         .nodes = nodes,
     };
 
-    ParallelRangeSettings settings;
+    TaskParallelSettings settings;
     BLI_parallel_range_settings_defaults(&settings);
     settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT);
     BLI_task_parallel_range(0, totnode, &data, sculpt_combine_proxies_task_cb, &settings);
@@ -4130,7 +4130,7 @@ static void sculpt_update_keyblock(Object *ob)
 
 static void sculpt_flush_stroke_deform_task_cb(void *__restrict userdata,
                                                const int n,
-                                               const ParallelRangeTLS *__restrict UNUSED(tls))
+                                               const TaskParallelTLS *__restrict UNUSED(tls))
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
@@ -4186,7 +4186,7 @@ static void sculpt_flush_stroke_deform(Sculpt *sd, Object *ob)
         .vertCos = vertCos,
     };
 
-    ParallelRangeSettings settings;
+    TaskParallelSettings settings;
     BLI_parallel_range_settings_defaults(&settings);
     settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT);
     BLI_task_parallel_range(0, totnode, &data, sculpt_flush_stroke_deform_task_cb, &settings);
index 81bb9c35817ac087b45b9d4c5f0ee93690a46484..e9d17b11ccce5e39ce529dbbb19c9f83ee089934 100644 (file)
@@ -323,7 +323,7 @@ static bool sculpt_undo_restore_mask(bContext *C, SculptUndoNode *unode)
 }
 
 static void sculpt_undo_bmesh_restore_generic_task_cb(
-    void *__restrict userdata, const int n, const ParallelRangeTLS *__restrict UNUSED(tls))
+    void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls))
 {
   PBVHNode **nodes = userdata;
 
@@ -351,7 +351,7 @@ static void sculpt_undo_bmesh_restore_generic(bContext *C,
 
     BKE_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode);
 
-    ParallelRangeSettings settings;
+    TaskParallelSettings settings;
     BLI_parallel_range_settings_defaults(&settings);
     settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT);
     BLI_task_parallel_range(
index 2aebc6c97fb91a1ea3214a678df8edca98182f23..c55d77800ffac19db256aaec25bb9ad7aa233d4c 100644 (file)
@@ -452,7 +452,7 @@ typedef struct MakeHistogramViewData {
 
 static void make_histogram_view_from_ibuf_byte_cb_ex(void *__restrict userdata,
                                                      const int y,
-                                                     const ParallelRangeTLS *__restrict tls)
+                                                     const TaskParallelTLS *__restrict tls)
 {
   MakeHistogramViewData *data = userdata;
   const ImBuf *ibuf = data->ibuf;
@@ -498,7 +498,7 @@ static ImBuf *make_histogram_view_from_ibuf_byte(ImBuf *ibuf)
       .ibuf = ibuf,
       .bins = bins,
   };
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = (ibuf->y >= 256);
   settings.userdata_chunk = bins;
@@ -553,7 +553,7 @@ BLI_INLINE int get_bin_float(float f)
 
 static void make_histogram_view_from_ibuf_float_cb_ex(void *__restrict userdata,
                                                       const int y,
-                                                      const ParallelRangeTLS *__restrict tls)
+                                                      const TaskParallelTLS *__restrict tls)
 {
   const MakeHistogramViewData *data = userdata;
   const ImBuf *ibuf = data->ibuf;
@@ -584,7 +584,7 @@ static ImBuf *make_histogram_view_from_ibuf_float(ImBuf *ibuf)
       .ibuf = ibuf,
       .bins = bins,
   };
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = (ibuf->y >= 256);
   settings.userdata_chunk = bins;
index 50447ae0376bb4da4f625c1ee8acd9a87f74688d..ac0d72214c8caddbf0299096ba01977b7426e477 100644 (file)
@@ -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);
index d89a47f4cf3b4f4da5917794e7f16fd757497540..da261b4f835bae4ba3a73e5041e580099c28b22e 100644 (file)
@@ -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);
index 5cded96efe29c9ca55879e1a38c8605e0a857f39..aff5b8b071b5924d10b394163be7faa09714ace7 100644 (file)
@@ -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;
 
index 47c0114f02f29702c7db7cdfcaed0d2a39425151..c428325e42b8dec9c5c5adaba9c87c057449770b 100644 (file)
@@ -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);
index 995f3d06fcb7691ea869b9641b6f18c631fc97f5..2c5f4b66c2366f0e4bc80971c1ca2f7e9dd338c5 100644 (file)
@@ -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);
index 37f25fd7c8996a24e07646f62075506a5732ea33..86d1b310d0c73f37c6cec61379fb2ce36a1e027f 100644 (file)
@@ -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;
index ab8146c66269c1cd0417d01eaf8d837cd12d3ef2..63c6245ced555c1310d0724978e9aa20bd77b10c 100644 (file)
@@ -895,7 +895,7 @@ typedef struct SampleCallbackData {
 
 static void point_density_sample_func(void *__restrict data_v,
                                       const int iter,
-                                      const ParallelRangeTLS *__restrict UNUSED(tls))
+                                      const TaskParallelTLS *__restrict UNUSED(tls))
 {
   SampleCallbackData *data = (SampleCallbackData *)data_v;
 
@@ -966,7 +966,7 @@ void RE_point_density_sample(Depsgraph *depsgraph,
   data.min = min;
   data.dim = dim;
   data.values = values;
-  ParallelRangeSettings settings;
+  TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.use_threading = (resolution > 32);
   BLI_task_parallel_range(0, resolution, &data, point_density_sample_func, &settings);