diff options
Diffstat (limited to 'source/blender')
32 files changed, 441 insertions, 192 deletions
diff --git a/source/blender/blenkernel/intern/CCGSubSurf_legacy.c b/source/blender/blenkernel/intern/CCGSubSurf_legacy.c index 363b7cff453..d289f63dac1 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf_legacy.c +++ b/source/blender/blenkernel/intern/CCGSubSurf_legacy.c @@ -136,8 +136,10 @@ typedef struct CCGSubSurfCalcSubdivData { int curLvl; } CCGSubSurfCalcSubdivData; -static void ccgSubSurf__calcVertNormals_faces_accumulate_cb(void *userdata, int ptrIdx, - const ParallelRangeTLS *UNUSED(tls)) +static void ccgSubSurf__calcVertNormals_faces_accumulate_cb( + void *__restrict userdata, + int ptrIdx, + const ParallelRangeTLS *__restrict UNUSED(tls)) { CCGSubSurfCalcSubdivData *data = userdata; @@ -228,8 +230,10 @@ static void ccgSubSurf__calcVertNormals_faces_accumulate_cb(void *userdata, int } } -static void ccgSubSurf__calcVertNormals_faces_finalize_cb(void *userdata, int ptrIdx, - const ParallelRangeTLS *UNUSED(tls)) +static void ccgSubSurf__calcVertNormals_faces_finalize_cb( + void *__restrict userdata, + int ptrIdx, + const ParallelRangeTLS *__restrict UNUSED(tls)) { CCGSubSurfCalcSubdivData *data = userdata; @@ -267,8 +271,10 @@ static void ccgSubSurf__calcVertNormals_faces_finalize_cb(void *userdata, int pt } } -static void ccgSubSurf__calcVertNormals_edges_accumulate_cb(void *userdata, int ptrIdx, - const ParallelRangeTLS *UNUSED(tls)) +static void ccgSubSurf__calcVertNormals_edges_accumulate_cb( + void *__restrict userdata, + int ptrIdx, + const ParallelRangeTLS *__restrict UNUSED(tls)) { CCGSubSurfCalcSubdivData *data = userdata; @@ -414,8 +420,10 @@ static void ccgSubSurf__calcVertNormals(CCGSubSurf *ss, } -static void ccgSubSurf__calcSubdivLevel_interior_faces_edges_midpoints_cb(void *userdata, int ptrIdx, - const ParallelRangeTLS *UNUSED(tls)) +static void ccgSubSurf__calcSubdivLevel_interior_faces_edges_midpoints_cb( + void *__restrict userdata, + int ptrIdx, + const ParallelRangeTLS *__restrict UNUSED(tls)) { CCGSubSurfCalcSubdivData *data = userdata; @@ -502,8 +510,10 @@ static void ccgSubSurf__calcSubdivLevel_interior_faces_edges_midpoints_cb(void * } } -static void ccgSubSurf__calcSubdivLevel_interior_faces_edges_centerpoints_shift_cb(void *userdata, int ptrIdx, - const ParallelRangeTLS *UNUSED(tls)) +static void ccgSubSurf__calcSubdivLevel_interior_faces_edges_centerpoints_shift_cb( + void *__restrict userdata, + int ptrIdx, + const ParallelRangeTLS *__restrict UNUSED(tls)) { CCGSubSurfCalcSubdivData *data = userdata; @@ -608,8 +618,10 @@ static void ccgSubSurf__calcSubdivLevel_interior_faces_edges_centerpoints_shift_ } } -static void ccgSubSurf__calcSubdivLevel_verts_copydata_cb(void *userdata, int ptrIdx, - const ParallelRangeTLS *UNUSED(tls)) +static void ccgSubSurf__calcSubdivLevel_verts_copydata_cb( + void *__restrict userdata, + int ptrIdx, + const ParallelRangeTLS *__restrict UNUSED(tls)) { CCGSubSurfCalcSubdivData *data = userdata; diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c index 46d06a3ac78..0fe429312db 100644 --- a/source/blender/blenkernel/intern/colortools.c +++ b/source/blender/blenkernel/intern/colortools.c @@ -1165,7 +1165,9 @@ typedef struct ScopesUpdateDataChunk { float min[3], max[3]; } ScopesUpdateDataChunk; -static void scopes_update_cb(void *userdata, const int y, const ParallelRangeTLS *tls) +static void scopes_update_cb(void *__restrict userdata, + const int y, + const ParallelRangeTLS *__restrict tls) { const ScopesUpdateData *data = userdata; @@ -1259,7 +1261,8 @@ static void scopes_update_cb(void *userdata, const int y, const ParallelRangeTLS } } -static void scopes_update_finalize(void *userdata, void *userdata_chunk) +static void scopes_update_finalize(void *__restrict userdata, + void *__restrict userdata_chunk) { const ScopesUpdateData *data = userdata; const ScopesUpdateDataChunk *data_chunk = userdata_chunk; diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index 4b7193adc21..de96d7e3176 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -611,7 +611,9 @@ static void freeGrid(PaintSurfaceData *data) bData->grid = NULL; } -static void grid_bound_insert_cb_ex(void *userdata, const int i, const ParallelRangeTLS *tls) +static void grid_bound_insert_cb_ex(void *__restrict userdata, + const int i, + const ParallelRangeTLS *__restrict tls) { PaintBakeData *bData = userdata; @@ -620,7 +622,8 @@ static void grid_bound_insert_cb_ex(void *userdata, const int i, const ParallelR boundInsert(grid_bound, bData->realCoord[bData->s_pos[i]].v); } -static void grid_bound_insert_finalize(void *userdata, void *userdata_chunk) +static void grid_bound_insert_finalize(void *__restrict userdata, + void *__restrict userdata_chunk) { PaintBakeData *bData = userdata; VolumeGrid *grid = bData->grid; @@ -631,7 +634,9 @@ static void grid_bound_insert_finalize(void *userdata, void *userdata_chunk) boundInsert(&grid->grid_bounds, grid_bound->max); } -static void grid_cell_points_cb_ex(void *userdata, const int i, const ParallelRangeTLS *tls) +static void grid_cell_points_cb_ex(void *__restrict userdata, + const int i, + const ParallelRangeTLS *__restrict tls) { PaintBakeData *bData = userdata; VolumeGrid *grid = bData->grid; @@ -650,7 +655,8 @@ static void grid_cell_points_cb_ex(void *userdata, const int i, const ParallelRa s_num[temp_t_index[i]]++; } -static void grid_cell_points_finalize(void *userdata, void *userdata_chunk) +static void grid_cell_points_finalize(void *__restrict userdata, + void *__restrict userdata_chunk) { PaintBakeData *bData = userdata; VolumeGrid *grid = bData->grid; @@ -664,7 +670,9 @@ static void grid_cell_points_finalize(void *userdata, void *userdata_chunk) } } -static void grid_cell_bounds_cb(void *userdata, const int x, const ParallelRangeTLS *UNUSED(tls)) +static void grid_cell_bounds_cb(void *__restrict userdata, + const int x, + const ParallelRangeTLS *__restrict UNUSED(tls)) { PaintBakeData *bData = userdata; VolumeGrid *grid = bData->grid; @@ -1424,8 +1432,10 @@ typedef struct DynamicPaintSetInitColorData { const bool scene_color_manage; } DynamicPaintSetInitColorData; -static void dynamic_paint_set_init_color_tex_to_vcol_cb(void *userdata, const int i, - const ParallelRangeTLS *UNUSED(tls)) +static void dynamic_paint_set_init_color_tex_to_vcol_cb( + void *__restrict userdata, + const int i, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const DynamicPaintSetInitColorData *data = userdata; @@ -1459,8 +1469,10 @@ static void dynamic_paint_set_init_color_tex_to_vcol_cb(void *userdata, const in } } -static void dynamic_paint_set_init_color_tex_to_imseq_cb(void *userdata, const int i, - const ParallelRangeTLS *UNUSED(tls)) +static void dynamic_paint_set_init_color_tex_to_imseq_cb( + void *__restrict userdata, + const int i, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const DynamicPaintSetInitColorData *data = userdata; @@ -1498,8 +1510,10 @@ static void dynamic_paint_set_init_color_tex_to_imseq_cb(void *userdata, const i pPoint[i].color[3] = texres.tin; } -static void dynamic_paint_set_init_color_vcol_to_imseq_cb(void *userdata, const int i, - const ParallelRangeTLS *UNUSED(tls)) +static void dynamic_paint_set_init_color_vcol_to_imseq_cb( + void *__restrict userdata, + const int i, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const DynamicPaintSetInitColorData *data = userdata; @@ -1719,8 +1733,10 @@ typedef struct DynamicPaintModifierApplyData { MLoopCol *mloopcol_preview; } DynamicPaintModifierApplyData; -static void dynamic_paint_apply_surface_displace_cb(void *userdata, const int i, - const ParallelRangeTLS *UNUSED(tls)) +static void dynamic_paint_apply_surface_displace_cb( + void *__restrict userdata, + const int i, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const DynamicPaintModifierApplyData *data = userdata; @@ -1760,8 +1776,10 @@ static void dynamicPaint_applySurfaceDisplace(DynamicPaintSurface *surface, Deri } } -static void dynamic_paint_apply_surface_vpaint_blend_cb(void *userdata, const int i, - const ParallelRangeTLS *UNUSED(tls)) +static void dynamic_paint_apply_surface_vpaint_blend_cb( + void *__restrict userdata, + const int i, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const DynamicPaintModifierApplyData *data = userdata; @@ -1772,8 +1790,10 @@ static void dynamic_paint_apply_surface_vpaint_blend_cb(void *userdata, const in blendColors(pPoint[i].color, pPoint[i].color[3], pPoint[i].e_color, pPoint[i].e_color[3], fcolor[i]); } -static void dynamic_paint_apply_surface_vpaint_cb(void *userdata, const int p_index, - const ParallelRangeTLS *UNUSED(tls)) +static void dynamic_paint_apply_surface_vpaint_cb( + void *__restrict userdata, + const int p_index, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const DynamicPaintModifierApplyData *data = userdata; Object *ob = data->ob; @@ -1843,8 +1863,10 @@ static void dynamic_paint_apply_surface_vpaint_cb(void *userdata, const int p_in } } -static void dynamic_paint_apply_surface_wave_cb(void *userdata, const int i, - const ParallelRangeTLS *UNUSED(tls)) +static void dynamic_paint_apply_surface_wave_cb( + void *__restrict userdata, + const int i, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const DynamicPaintModifierApplyData *data = userdata; @@ -2182,8 +2204,10 @@ typedef struct DynamicPaintCreateUVSurfaceData { uint32_t *active_points; } DynamicPaintCreateUVSurfaceData; -static void dynamic_paint_create_uv_surface_direct_cb(void *userdata, const int ty, - const ParallelRangeTLS *UNUSED(tls)) +static void dynamic_paint_create_uv_surface_direct_cb( + void *__restrict userdata, + const int ty, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const DynamicPaintCreateUVSurfaceData *data = userdata; @@ -2280,8 +2304,10 @@ static void dynamic_paint_create_uv_surface_direct_cb(void *userdata, const int } } -static void dynamic_paint_create_uv_surface_neighbor_cb(void *userdata, const int ty, - const ParallelRangeTLS *UNUSED(tls)) +static void dynamic_paint_create_uv_surface_neighbor_cb( + void *__restrict userdata, + const int ty, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const DynamicPaintCreateUVSurfaceData *data = userdata; @@ -3089,8 +3115,10 @@ typedef struct DynamicPaintOutputSurfaceImageData { ImBuf *ibuf; } DynamicPaintOutputSurfaceImageData; -static void dynamic_paint_output_surface_image_paint_cb(void *userdata, const int index, - const ParallelRangeTLS *UNUSED(tls)) +static void dynamic_paint_output_surface_image_paint_cb( + void *__restrict userdata, + const int index, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const DynamicPaintOutputSurfaceImageData *data = userdata; @@ -3110,8 +3138,10 @@ static void dynamic_paint_output_surface_image_paint_cb(void *userdata, const in } } -static void dynamic_paint_output_surface_image_displace_cb(void *userdata, const int index, - const ParallelRangeTLS *UNUSED(tls)) +static void dynamic_paint_output_surface_image_displace_cb( + void *__restrict userdata, + const int index, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const DynamicPaintOutputSurfaceImageData *data = userdata; @@ -3135,8 +3165,10 @@ static void dynamic_paint_output_surface_image_displace_cb(void *userdata, const ibuf->rect_float[pos + 3] = 1.0f; } -static void dynamic_paint_output_surface_image_wave_cb(void *userdata, const int index, - const ParallelRangeTLS *UNUSED(tls)) +static void dynamic_paint_output_surface_image_wave_cb( + void *__restrict userdata, + const int index, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const DynamicPaintOutputSurfaceImageData *data = userdata; @@ -3158,8 +3190,10 @@ static void dynamic_paint_output_surface_image_wave_cb(void *userdata, const int ibuf->rect_float[pos + 3] = 1.0f; } -static void dynamic_paint_output_surface_image_wetmap_cb(void *userdata, const int index, - const ParallelRangeTLS *UNUSED(tls)) +static void dynamic_paint_output_surface_image_wetmap_cb( + void *__restrict userdata, + const int index, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const DynamicPaintOutputSurfaceImageData *data = userdata; @@ -3679,8 +3713,10 @@ typedef struct DynamicPaintBrushVelocityData { const float timescale; } DynamicPaintBrushVelocityData; -static void dynamic_paint_brush_velocity_compute_cb(void *userdata, const int i, - const ParallelRangeTLS *UNUSED(tls)) +static void dynamic_paint_brush_velocity_compute_cb( + void *__restrict userdata, + const int i, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const DynamicPaintBrushVelocityData *data = userdata; @@ -3836,7 +3872,9 @@ typedef struct DynamicPaintPaintData { * Paint a brush object mesh to the surface */ static void dynamic_paint_paint_mesh_cell_point_cb_ex( - void *userdata, const int id, const ParallelRangeTLS *UNUSED(tls)) + void *__restrict userdata, + const int id, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const DynamicPaintPaintData *data = userdata; @@ -4281,7 +4319,9 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface, * Paint a particle system to the surface */ static void dynamic_paint_paint_particle_cell_point_cb_ex( - void *userdata, const int id, const ParallelRangeTLS *UNUSED(tls)) + void *__restrict userdata, + const int id, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const DynamicPaintPaintData *data = userdata; @@ -4560,7 +4600,9 @@ 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 *userdata, const int index, const ParallelRangeTLS *UNUSED(tls)) + void *__restrict userdata, + const int index, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const DynamicPaintPaintData *data = userdata; @@ -4710,8 +4752,10 @@ static int dynamicPaint_paintSinglePoint( * Calculate current frame distances and directions for adjacency data */ -static void dynamic_paint_prepare_adjacency_cb(void *userdata, const int index, - const ParallelRangeTLS *UNUSED(tls)) +static void dynamic_paint_prepare_adjacency_cb( + void *__restrict userdata, + const int index, + const ParallelRangeTLS *__restrict UNUSED(tls)) { PaintSurfaceData *sData = userdata; PaintBakeData *bData = sData->bData; @@ -4943,8 +4987,10 @@ typedef struct DynamicPaintEffectData { * Prepare data required by effects for current frame. * Returns number of steps required */ -static void dynamic_paint_prepare_effect_cb(void *userdata, const int index, - const ParallelRangeTLS *UNUSED(tls)) +static void dynamic_paint_prepare_effect_cb( + void *__restrict userdata, + const int index, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const DynamicPaintEffectData *data = userdata; @@ -5054,8 +5100,10 @@ static int dynamicPaint_prepareEffectStep( /** * Processes active effect step. */ -static void dynamic_paint_effect_spread_cb(void *userdata, const int index, - const ParallelRangeTLS *UNUSED(tls)) +static void dynamic_paint_effect_spread_cb( + void *__restrict userdata, + const int index, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const DynamicPaintEffectData *data = userdata; @@ -5100,8 +5148,10 @@ static void dynamic_paint_effect_spread_cb(void *userdata, const int index, } } -static void dynamic_paint_effect_shrink_cb(void *userdata, const int index, - const ParallelRangeTLS *UNUSED(tls)) +static void dynamic_paint_effect_shrink_cb( + void *__restrict userdata, + const int index, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const DynamicPaintEffectData *data = userdata; @@ -5151,8 +5201,10 @@ static void dynamic_paint_effect_shrink_cb(void *userdata, const int index, } } -static void dynamic_paint_effect_drip_cb(void *userdata, const int index, - const ParallelRangeTLS *UNUSED(tls)) +static void dynamic_paint_effect_drip_cb( + void *__restrict userdata, + const int index, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const DynamicPaintEffectData *data = userdata; @@ -5345,8 +5397,10 @@ static void dynamicPaint_doEffectStep( } } -static void dynamic_paint_border_cb(void *userdata, const int b_index, - const ParallelRangeTLS *UNUSED(tls)) +static void dynamic_paint_border_cb( + void *__restrict userdata, + const int b_index, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const DynamicPaintEffectData *data = userdata; @@ -5425,8 +5479,10 @@ static void dynamicPaint_doBorderStep(DynamicPaintSurface *surface) &settings); } -static void dynamic_paint_wave_step_cb(void *userdata, const int index, - const ParallelRangeTLS *UNUSED(tls)) +static void dynamic_paint_wave_step_cb( + void *__restrict userdata, + const int index, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const DynamicPaintEffectData *data = userdata; @@ -5593,8 +5649,10 @@ typedef struct DynamicPaintDissolveDryData { const float timescale; } DynamicPaintDissolveDryData; -static void dynamic_paint_surface_pre_step_cb(void *userdata, const int index, - const ParallelRangeTLS *UNUSED(tls)) +static void dynamic_paint_surface_pre_step_cb( + void *__restrict userdata, + const int index, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const DynamicPaintDissolveDryData *data = userdata; @@ -5717,8 +5775,10 @@ typedef struct DynamicPaintGenerateBakeData { const bool new_bdata; } DynamicPaintGenerateBakeData; -static void dynamic_paint_generate_bake_data_cb(void *userdata, const int index, - const ParallelRangeTLS *UNUSED(tls)) +static void dynamic_paint_generate_bake_data_cb( + void *__restrict userdata, + const int index, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const DynamicPaintGenerateBakeData *data = userdata; diff --git a/source/blender/blenkernel/intern/mask_rasterize.c b/source/blender/blenkernel/intern/mask_rasterize.c index 6efcb27c0f5..093a1967ae8 100644 --- a/source/blender/blenkernel/intern/mask_rasterize.c +++ b/source/blender/blenkernel/intern/mask_rasterize.c @@ -1434,8 +1434,10 @@ typedef struct MaskRasterizeBufferData { float *buffer; } MaskRasterizeBufferData; -static void maskrasterize_buffer_cb(void *userdata, int y, - const ParallelRangeTLS *UNUSED(tls)) +static void maskrasterize_buffer_cb( + void *__restrict userdata, + int y, + const ParallelRangeTLS *__restrict UNUSED(tls)) { MaskRasterizeBufferData *data = userdata; diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c index c1beaaaac75..b321065d84c 100644 --- a/source/blender/blenkernel/intern/mesh_evaluate.c +++ b/source/blender/blenkernel/intern/mesh_evaluate.c @@ -177,8 +177,10 @@ typedef struct MeshCalcNormalsData { float (*vnors)[3]; } MeshCalcNormalsData; -static void mesh_calc_normals_poly_cb(void *userdata, const int pidx, - const ParallelRangeTLS *UNUSED(tls)) +static void mesh_calc_normals_poly_cb( + void *__restrict userdata, + const int pidx, + const ParallelRangeTLS *__restrict UNUSED(tls)) { MeshCalcNormalsData *data = userdata; const MPoly *mp = &data->mpolys[pidx]; @@ -186,8 +188,10 @@ static void mesh_calc_normals_poly_cb(void *userdata, const int pidx, BKE_mesh_calc_poly_normal(mp, data->mloop + mp->loopstart, data->mverts, data->pnors[pidx]); } -static void mesh_calc_normals_poly_prepare_cb(void *userdata, const int pidx, - const ParallelRangeTLS *UNUSED(tls)) +static void mesh_calc_normals_poly_prepare_cb( + void *__restrict userdata, + const int pidx, + const ParallelRangeTLS *__restrict UNUSED(tls)) { MeshCalcNormalsData *data = userdata; const MPoly *mp = &data->mpolys[pidx]; @@ -249,16 +253,20 @@ static void mesh_calc_normals_poly_prepare_cb(void *userdata, const int pidx, } } -static void mesh_calc_normals_poly_accum_cb(void *userdata, const int lidx, - const ParallelRangeTLS *UNUSED(tls)) +static void mesh_calc_normals_poly_accum_cb( + void *__restrict userdata, + const int lidx, + const ParallelRangeTLS *__restrict UNUSED(tls)) { MeshCalcNormalsData *data = userdata; add_v3_v3(data->vnors[data->mloop[lidx].v], data->lnors_weighted[lidx]); } -static void mesh_calc_normals_poly_finalize_cb(void *userdata, const int vidx, - const ParallelRangeTLS *UNUSED(tls)) +static void mesh_calc_normals_poly_finalize_cb( + void *__restrict userdata, + const int vidx, + const ParallelRangeTLS *__restrict UNUSED(tls)) { MeshCalcNormalsData *data = userdata; diff --git a/source/blender/blenkernel/intern/ocean.c b/source/blender/blenkernel/intern/ocean.c index 478b7ef21ef..0b4bc39627e 100644 --- a/source/blender/blenkernel/intern/ocean.c +++ b/source/blender/blenkernel/intern/ocean.c @@ -502,8 +502,10 @@ typedef struct OceanSimulateData { float chop_amount; } OceanSimulateData; -static void ocean_compute_htilda(void *userdata, const int i, - const ParallelRangeTLS *UNUSED(tls)) +static void ocean_compute_htilda( + void *__restrict userdata, + const int i, + const ParallelRangeTLS *__restrict UNUSED(tls)) { OceanSimulateData *osd = userdata; const Ocean *o = osd->o; diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 628939c6c18..c5cc7c28243 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -3371,7 +3371,9 @@ typedef struct DynamicStepSolverTaskData { } DynamicStepSolverTaskData; static void dynamics_step_sph_ddr_task_cb_ex( - void *userdata, const int p, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int p, + const ParallelRangeTLS *__restrict tls) { DynamicStepSolverTaskData *data = userdata; ParticleSimulationData *sim = data->sim; @@ -3405,7 +3407,9 @@ static void dynamics_step_sph_ddr_task_cb_ex( } static void dynamics_step_sph_classical_basic_integrate_task_cb_ex( - void *userdata, const int p, const ParallelRangeTLS *UNUSED(tls)) + void *__restrict userdata, + const int p, + const ParallelRangeTLS *__restrict UNUSED(tls)) { DynamicStepSolverTaskData *data = userdata; ParticleSimulationData *sim = data->sim; @@ -3421,7 +3425,9 @@ static void dynamics_step_sph_classical_basic_integrate_task_cb_ex( } static void dynamics_step_sph_classical_calc_density_task_cb_ex( - void *userdata, const int p, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int p, + const ParallelRangeTLS *__restrict tls) { DynamicStepSolverTaskData *data = userdata; ParticleSimulationData *sim = data->sim; @@ -3439,7 +3445,9 @@ static void dynamics_step_sph_classical_calc_density_task_cb_ex( } static void dynamics_step_sph_classical_integrate_task_cb_ex( - void *userdata, const int p, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int p, + const ParallelRangeTLS *__restrict tls) { DynamicStepSolverTaskData *data = userdata; ParticleSimulationData *sim = data->sim; diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c index 43ea1ad83a0..46bd310066f 100644 --- a/source/blender/blenkernel/intern/pbvh.c +++ b/source/blender/blenkernel/intern/pbvh.c @@ -938,8 +938,10 @@ typedef struct PBVHUpdateData { int flag; } PBVHUpdateData; -static void pbvh_update_normals_accum_task_cb(void *userdata, const int n, - const ParallelRangeTLS *UNUSED(tls)) +static void pbvh_update_normals_accum_task_cb( + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict UNUSED(tls)) { PBVHUpdateData *data = userdata; @@ -992,8 +994,10 @@ static void pbvh_update_normals_accum_task_cb(void *userdata, const int n, } } -static void pbvh_update_normals_store_task_cb(void *userdata, const int n, - const ParallelRangeTLS *UNUSED(tls)) +static void pbvh_update_normals_store_task_cb( + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict UNUSED(tls)) { PBVHUpdateData *data = userdata; PBVH *bvh = data->bvh; @@ -1063,8 +1067,10 @@ static void pbvh_update_normals(PBVH *bvh, PBVHNode **nodes, MEM_freeN(vnors); } -static void pbvh_update_BB_redraw_task_cb(void *userdata, const int n, - const ParallelRangeTLS *UNUSED(tls)) +static void pbvh_update_BB_redraw_task_cb( + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict UNUSED(tls)) { PBVHUpdateData *data = userdata; PBVH *bvh = data->bvh; diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c index 0f12bb0a8da..4e887d21f4f 100644 --- a/source/blender/blenkernel/intern/shrinkwrap.c +++ b/source/blender/blenkernel/intern/shrinkwrap.c @@ -88,7 +88,9 @@ typedef struct ShrinkwrapCalcCBData { * for each vertex performs a nearest vertex search on the tree */ static void shrinkwrap_calc_nearest_vertex_cb_ex( - void *userdata, const int i, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int i, + const ParallelRangeTLS *__restrict tls) { ShrinkwrapCalcCBData *data = userdata; @@ -262,7 +264,9 @@ bool BKE_shrinkwrap_project_normal( } static void shrinkwrap_calc_normal_projection_cb_ex( - void *userdata, const int i, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int i, + const ParallelRangeTLS *__restrict tls) { ShrinkwrapCalcCBData *data = userdata; @@ -506,7 +510,9 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc, bool for * NN matches for each vertex */ static void shrinkwrap_calc_nearest_surface_point_cb_ex( - void *userdata, const int i, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int i, + const ParallelRangeTLS *__restrict tls) { ShrinkwrapCalcCBData *data = userdata; diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index 9c245b444ee..3cf98b284b1 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -738,7 +738,10 @@ typedef struct ObstaclesFromDMData { int *num_obstacles; } ObstaclesFromDMData; -static void obstacles_from_derivedmesh_task_cb(void *userdata, const int z, const ParallelRangeTLS *UNUSED(tls)) +static void obstacles_from_derivedmesh_task_cb( + void *__restrict userdata, + const int z, + const ParallelRangeTLS *__restrict UNUSED(tls)) { ObstaclesFromDMData *data = userdata; SmokeDomainSettings *sds = data->sds; @@ -1189,7 +1192,10 @@ typedef struct EmitFromParticlesData { float hr_smooth; } EmitFromParticlesData; -static void emit_from_particles_task_cb(void *userdata, const int z, const ParallelRangeTLS *UNUSED(tls)) +static void emit_from_particles_task_cb( + void *__restrict userdata, + const int z, + const ParallelRangeTLS *__restrict UNUSED(tls)) { EmitFromParticlesData *data = userdata; SmokeFlowSettings *sfs = data->sfs; @@ -1578,7 +1584,10 @@ typedef struct EmitFromDMData { int *min, *max, *res; } EmitFromDMData; -static void emit_from_derivedmesh_task_cb(void *userdata, const int z, const ParallelRangeTLS *UNUSED(tls)) +static void emit_from_derivedmesh_task_cb( + void *__restrict userdata, + const int z, + const ParallelRangeTLS *__restrict UNUSED(tls)) { EmitFromDMData *data = userdata; EmissionMap *em = data->em; @@ -2453,7 +2462,10 @@ typedef struct UpdateEffectorsData { unsigned char *obstacle; } UpdateEffectorsData; -static void update_effectors_task_cb(void *userdata, const int x, const ParallelRangeTLS *UNUSED(tls)) +static void update_effectors_task_cb( + void *__restrict userdata, + const int x, + const ParallelRangeTLS *__restrict UNUSED(tls)) { UpdateEffectorsData *data = userdata; SmokeDomainSettings *sds = data->sds; diff --git a/source/blender/blenkernel/intern/tracking_auto.c b/source/blender/blenkernel/intern/tracking_auto.c index 0874d645a34..d297a92f29e 100644 --- a/source/blender/blenkernel/intern/tracking_auto.c +++ b/source/blender/blenkernel/intern/tracking_auto.c @@ -432,9 +432,10 @@ AutoTrackContext *BKE_autotrack_context_new(MovieClip *clip, return context; } -static void autotrack_context_step_cb(void *userdata, - int track, - const ParallelRangeTLS *UNUSED(tls)) +static void autotrack_context_step_cb( + void *__restrict userdata, + int track, + const ParallelRangeTLS *__restrict UNUSED(tls)) { AutoTrackContext *context = userdata; const int frame_delta = context->backwards ? -1 : 1; diff --git a/source/blender/blenkernel/intern/tracking_stabilize.c b/source/blender/blenkernel/intern/tracking_stabilize.c index fe850708547..bd83c2eb6dc 100644 --- a/source/blender/blenkernel/intern/tracking_stabilize.c +++ b/source/blender/blenkernel/intern/tracking_stabilize.c @@ -1504,9 +1504,9 @@ typedef struct TrackingStabilizeFrameInterpolationData { } TrackingStabilizeFrameInterpolationData; static void tracking_stabilize_frame_interpolation_cb( - void *userdata, + void *__restrict userdata, int j, - const ParallelRangeTLS *UNUSED(tls)) + const ParallelRangeTLS *__restrict UNUSED(tls)) { TrackingStabilizeFrameInterpolationData *data = userdata; ImBuf *ibuf = data->ibuf; diff --git a/source/blender/blenlib/BLI_task.h b/source/blender/blenlib/BLI_task.h index 52f32c2999f..1285e24e567 100644 --- a/source/blender/blenlib/BLI_task.h +++ b/source/blender/blenlib/BLI_task.h @@ -143,10 +143,11 @@ typedef struct ParallelRangeTLS { void *userdata_chunk; } ParallelRangeTLS; -typedef void (*TaskParallelRangeFunc)(void *userdata, +typedef void (*TaskParallelRangeFunc)(void *__restrict userdata, const int iter, - const ParallelRangeTLS *tls); -typedef void (*TaskParallelRangeFuncFinalize)(void *userdata, void *userdata_chunk); + const ParallelRangeTLS *__restrict tls); +typedef void (*TaskParallelRangeFuncFinalize)(void *__restrict userdata, + void *__restrict userdata_chunk); typedef struct ParallelRangeSettings { /* Whether caller allows to do threading of the particular range. diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index 03784e31eee..55667d19f76 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -798,7 +798,10 @@ typedef struct BVHDivNodesData { int first_of_next_level; } BVHDivNodesData; -static void non_recursive_bvh_div_nodes_task_cb(void *userdata, const int j, const ParallelRangeTLS *UNUSED(tls)) +static void non_recursive_bvh_div_nodes_task_cb( + void *__restrict userdata, + const int j, + const ParallelRangeTLS *__restrict UNUSED(tls)) { BVHDivNodesData *data = userdata; @@ -1282,7 +1285,10 @@ int BLI_bvhtree_overlap_thread_num(const BVHTree *tree) return (int)MIN2(tree->tree_type, tree->nodes[tree->totleaf]->totnode); } -static void bvhtree_overlap_task_cb(void *userdata, const int j, const ParallelRangeTLS *UNUSED(tls)) +static void bvhtree_overlap_task_cb( + void *__restrict userdata, + const int j, + const ParallelRangeTLS *__restrict UNUSED(tls)) { BVHOverlapData_Thread *data = &((BVHOverlapData_Thread *)userdata)[j]; BVHOverlapData_Shared *data_shared = data->shared; diff --git a/source/blender/blenlib/intern/math_statistics.c b/source/blender/blenlib/intern/math_statistics.c index 14e3aaea053..3a19f1d3603 100644 --- a/source/blender/blenlib/intern/math_statistics.c +++ b/source/blender/blenlib/intern/math_statistics.c @@ -46,8 +46,10 @@ typedef struct CovarianceData { int nbr_cos_vn; } CovarianceData; -static void covariance_m_vn_ex_task_cb(void *userdata, const int a, - const ParallelRangeTLS *UNUSED(tls)) +static void covariance_m_vn_ex_task_cb( + void *__restrict userdata, + const int a, + const ParallelRangeTLS *__restrict UNUSED(tls)) { CovarianceData *data = userdata; const float *cos_vn = data->cos_vn; diff --git a/source/blender/bmesh/intern/bmesh_interp.c b/source/blender/bmesh/intern/bmesh_interp.c index 447eb3aa858..a701d4de05b 100644 --- a/source/blender/bmesh/intern/bmesh_interp.c +++ b/source/blender/bmesh/intern/bmesh_interp.c @@ -419,8 +419,10 @@ typedef struct BMLoopInterpMultiresData { float d; } BMLoopInterpMultiresData; -static void loop_interp_multires_cb(void *userdata, int ix, - const ParallelRangeTLS *UNUSED(tls)) +static void loop_interp_multires_cb( + void *__restrict userdata, + int ix, + const ParallelRangeTLS *__restrict UNUSED(tls)) { BMLoopInterpMultiresData *data = userdata; diff --git a/source/blender/depsgraph/intern/eval/deg_eval.cc b/source/blender/depsgraph/intern/eval/deg_eval.cc index 565bb041cb6..d8d4906a71a 100644 --- a/source/blender/depsgraph/intern/eval/deg_eval.cc +++ b/source/blender/depsgraph/intern/eval/deg_eval.cc @@ -107,9 +107,10 @@ typedef struct CalculatePengindData { unsigned int layers; } CalculatePengindData; -static void calculate_pending_func(void *data_v, - int i, - const ParallelRangeTLS * /*tls*/) +static void calculate_pending_func( + void *__restrict data_v, + int i, + const ParallelRangeTLS *__restrict /*tls*/) { CalculatePengindData *data = (CalculatePengindData *)data_v; Depsgraph *graph = data->graph; diff --git a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc index 7650e907c0b..de4c60bc193 100644 --- a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc +++ b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc @@ -83,18 +83,20 @@ void lib_id_recalc_data_tag(Main *bmain, ID *id) DEG_id_type_tag(bmain, GS(id->name)); } -void flush_init_operation_node_func(void *data_v, - int i, - const ParallelRangeTLS * /*tls*/) +void flush_init_operation_node_func( + void *__restrict data_v, + int i, + const ParallelRangeTLS *__restrict /*tls*/) { Depsgraph *graph = (Depsgraph *)data_v; OperationDepsNode *node = graph->operations[i]; node->scheduled = false; } -void flush_init_id_node_func(void *data_v, - int i, - const ParallelRangeTLS * /*tls*/) +void flush_init_id_node_func( + void *__restrict data_v, + int i, + const ParallelRangeTLS *__restrict /*tls*/) { Depsgraph *graph = (Depsgraph *)data_v; IDDepsNode *id_node = graph->id_nodes[i]; @@ -293,9 +295,10 @@ void deg_graph_flush_updates(Main *bmain, Depsgraph *graph) flush_editors_id_update(bmain, graph); } -static void graph_clear_func(void *data_v, - int i, - const ParallelRangeTLS * /*tls*/) +static void graph_clear_func( + void *__restrict data_v, + int i, + const ParallelRangeTLS *__restrict /*tls*/) { Depsgraph *graph = (Depsgraph *)data_v; OperationDepsNode *node = graph->operations[i]; diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index 84e75f0e7fc..e8778eea3b9 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -151,7 +151,10 @@ typedef struct LoadTexData { float radius; } LoadTexData; -static void load_tex_task_cb_ex(void *userdata, const int j, const ParallelRangeTLS *tls) +static void load_tex_task_cb_ex( + void *__restrict userdata, + const int j, + const ParallelRangeTLS *__restrict tls) { LoadTexData *data = userdata; Brush *br = data->br; @@ -369,7 +372,10 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima return 1; } -static void load_tex_cursor_task_cb(void *userdata, const int j, const ParallelRangeTLS *UNUSED(tls)) +static void load_tex_cursor_task_cb( + void *__restrict userdata, + const int j, + const ParallelRangeTLS *__restrict UNUSED(tls)) { LoadTexData *data = userdata; Brush *br = data->br; diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c index 4be6c71e587..894277402a7 100644 --- a/source/blender/editors/sculpt_paint/paint_image_2d.c +++ b/source/blender/editors/sculpt_paint/paint_image_2d.c @@ -1070,8 +1070,10 @@ typedef struct Paint2DForeachData { int tilew; } Paint2DForeachData; -static void paint_2d_op_foreach_do(void *data_v, const int iter, - const ParallelRangeTLS *UNUSED(tls)) +static void paint_2d_op_foreach_do( + void *__restrict data_v, + const int iter, + const ParallelRangeTLS *__restrict UNUSED(tls)) { Paint2DForeachData *data = (Paint2DForeachData *)data_v; paint_2d_do_making_brush(data->s, data->region, data->curveb, diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c index d755bb707c2..264135d1d03 100644 --- a/source/blender/editors/sculpt_paint/paint_mask.c +++ b/source/blender/editors/sculpt_paint/paint_mask.c @@ -104,8 +104,10 @@ typedef struct MaskTaskData { float (*clip_planes_final)[4]; } MaskTaskData; -static void mask_flood_fill_task_cb(void *userdata, const int i, - const ParallelRangeTLS *UNUSED(tls)) +static void mask_flood_fill_task_cb( + void *__restrict userdata, + const int i, + const ParallelRangeTLS *__restrict UNUSED(tls)) { MaskTaskData *data = userdata; @@ -222,8 +224,10 @@ static void flip_plane(float out[4], const float in[4], const char symm) out[3] = in[3]; } -static void mask_box_select_task_cb(void *userdata, const int i, - const ParallelRangeTLS *UNUSED(tls)) +static void mask_box_select_task_cb( + void *__restrict userdata, + const int i, + const ParallelRangeTLS *__restrict UNUSED(tls)) { MaskTaskData *data = userdata; @@ -381,8 +385,10 @@ static void mask_lasso_px_cb(int x, int x_end, int y, void *user_data) } while (++index != index_end); } -static void mask_gesture_lasso_task_cb(void *userdata, const int i, - const ParallelRangeTLS *UNUSED(tls)) +static void mask_gesture_lasso_task_cb( + void *__restrict userdata, + const int i, + const ParallelRangeTLS *__restrict UNUSED(tls)) { LassoMaskData *lasso_data = userdata; MaskTaskData *data = &lasso_data->task_data; diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 6303d700b40..a5405338ada 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -1431,7 +1431,9 @@ static float wpaint_get_active_weight(const MDeformVert *dv, const WeightPaintIn } static void do_wpaint_precompute_weight_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *UNUSED(tls)) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict UNUSED(tls)) { SculptThreadedTaskData *data = userdata; const MDeformVert *dv = &data->me->dvert[n]; @@ -1462,7 +1464,9 @@ static void precompute_weight_values( } static void do_wpaint_brush_blur_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *UNUSED(tls)) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict UNUSED(tls)) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -1551,7 +1555,9 @@ static void do_wpaint_brush_blur_task_cb_ex( } static void do_wpaint_brush_smear_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *UNUSED(tls)) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict UNUSED(tls)) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -1658,7 +1664,9 @@ static void do_wpaint_brush_smear_task_cb_ex( } static void do_wpaint_brush_draw_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *UNUSED(tls)) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict UNUSED(tls)) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -1728,7 +1736,9 @@ static void do_wpaint_brush_draw_task_cb_ex( } static void do_wpaint_brush_calc_average_weight_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *UNUSED(tls)) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict UNUSED(tls)) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2396,7 +2406,9 @@ static bool vpaint_stroke_test_start(bContext *C, struct wmOperator *op, const f } static void do_vpaint_brush_calc_average_color_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *UNUSED(tls)) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict UNUSED(tls)) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2458,7 +2470,9 @@ static float tex_color_alpha_ubyte( } static void do_vpaint_brush_draw_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *UNUSED(tls)) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict UNUSED(tls)) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2550,7 +2564,9 @@ static void do_vpaint_brush_draw_task_cb_ex( } static void do_vpaint_brush_blur_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *UNUSED(tls)) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict UNUSED(tls)) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2659,7 +2675,9 @@ static void do_vpaint_brush_blur_task_cb_ex( } static void do_vpaint_brush_smear_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *UNUSED(tls)) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict UNUSED(tls)) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index acffeb70027..37af1732045 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -376,8 +376,10 @@ static bool sculpt_stroke_is_dynamic_topology( /*** paint mesh ***/ -static void paint_mesh_restore_co_task_cb(void *userdata, const int n, - const ParallelRangeTLS *UNUSED(tls)) +static void paint_mesh_restore_co_task_cb( + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict UNUSED(tls)) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -800,8 +802,10 @@ static float calc_symmetry_feather(Sculpt *sd, StrokeCache *cache) * \note These are all _very_ similar, when changing one, check others. * \{ */ -static void calc_area_normal_and_center_task_cb(void *userdata, const int n, - const ParallelRangeTLS *UNUSED(tls)) +static void calc_area_normal_and_center_task_cb( + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict UNUSED(tls)) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -1648,7 +1652,9 @@ typedef struct { } SculptFindNearestToRayData; static void do_smooth_brush_mesh_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -1696,7 +1702,9 @@ static void do_smooth_brush_mesh_task_cb_ex( } static void do_smooth_brush_bmesh_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -1744,7 +1752,9 @@ static void do_smooth_brush_bmesh_task_cb_ex( } static void do_smooth_brush_multires_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptDoBrushSmoothGridDataChunk *data_chunk = tls->userdata_chunk; @@ -1974,7 +1984,9 @@ static void do_smooth_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod } static void do_mask_brush_draw_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2039,7 +2051,9 @@ static void do_mask_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) } static void do_draw_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2104,7 +2118,9 @@ static void do_draw_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) * Used for 'SCULPT_TOOL_CREASE' and 'SCULPT_TOOL_BLOB' */ static void do_crease_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2203,7 +2219,9 @@ static void do_crease_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod } static void do_pinch_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2259,7 +2277,9 @@ static void do_pinch_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode } static void do_grab_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2325,7 +2345,9 @@ static void do_grab_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) } static void do_nudge_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2386,7 +2408,9 @@ static void do_nudge_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode } static void do_snake_hook_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2497,7 +2521,9 @@ static void do_snake_hook_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int to } static void do_thumb_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2563,7 +2589,9 @@ static void do_thumb_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode } static void do_rotate_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2630,7 +2658,9 @@ static void do_rotate_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod } static void do_layer_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2722,7 +2752,9 @@ static void do_layer_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode } static void do_inflate_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2891,7 +2923,9 @@ static float get_offset(Sculpt *sd, SculptSession *ss) } static void do_flatten_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2974,7 +3008,9 @@ static void do_flatten_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totno } static void do_clay_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -3065,7 +3101,9 @@ static void do_clay_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) } static void do_clay_strips_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -3180,7 +3218,9 @@ static void do_clay_strips_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int t } static void do_fill_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -3266,7 +3306,9 @@ static void do_fill_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) } static void do_scrape_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -3351,7 +3393,9 @@ static void do_scrape_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod } static void do_gravity_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -3511,8 +3555,10 @@ static void sculpt_topology_update(Sculpt *sd, Object *ob, Brush *brush, Unified } } -static void do_brush_action_task_cb(void *userdata, const int n, - const ParallelRangeTLS *UNUSED(tls)) +static void do_brush_action_task_cb( + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict UNUSED(tls)) { SculptThreadedTaskData *data = userdata; @@ -3658,8 +3704,10 @@ static void sculpt_flush_pbvhvert_deform(Object *ob, PBVHVertexIter *vd) copy_v3_v3(me->mvert[index].co, newco); } -static void sculpt_combine_proxies_task_cb(void *userdata, const int n, - const ParallelRangeTLS *UNUSED(tls)) +static void sculpt_combine_proxies_task_cb( + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict UNUSED(tls)) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -3759,8 +3807,10 @@ static void sculpt_update_keyblock(Object *ob) } } -static void sculpt_flush_stroke_deform_task_cb(void *userdata, const int n, - const ParallelRangeTLS *UNUSED(tls)) +static void sculpt_flush_stroke_deform_task_cb( + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict UNUSED(tls)) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index 7d66d93289a..1b96d2fd5a0 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -316,8 +316,10 @@ static bool sculpt_undo_restore_mask(bContext *C, DerivedMesh *dm, SculptUndoNod return 1; } -static void sculpt_undo_bmesh_restore_generic_task_cb(void *userdata, const int n, - const ParallelRangeTLS *UNUSED(tls)) +static void sculpt_undo_bmesh_restore_generic_task_cb( + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict UNUSED(tls)) { PBVHNode **nodes = userdata; diff --git a/source/blender/editors/space_sequencer/sequencer_scopes.c b/source/blender/editors/space_sequencer/sequencer_scopes.c index 25ee4041d8e..c5d6edadb53 100644 --- a/source/blender/editors/space_sequencer/sequencer_scopes.c +++ b/source/blender/editors/space_sequencer/sequencer_scopes.c @@ -459,7 +459,9 @@ typedef struct MakeHistogramViewData { } MakeHistogramViewData; static void make_histogram_view_from_ibuf_byte_cb_ex( - void *userdata, const int y, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int y, + const ParallelRangeTLS *__restrict tls) { MakeHistogramViewData *data = userdata; const ImBuf *ibuf = data->ibuf; @@ -476,7 +478,8 @@ static void make_histogram_view_from_ibuf_byte_cb_ex( } } -static void make_histogram_view_from_ibuf_finalize(void *userdata, void *userdata_chunk) +static void make_histogram_view_from_ibuf_finalize(void *__restrict userdata, + void *__restrict userdata_chunk) { MakeHistogramViewData *data = userdata; uint32_t (*bins)[HIS_STEPS] = data->bins; @@ -556,7 +559,9 @@ BLI_INLINE int get_bin_float(float f) } static void make_histogram_view_from_ibuf_float_cb_ex( - void *userdata, const int y, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int y, + const ParallelRangeTLS *__restrict tls) { const MakeHistogramViewData *data = userdata; const ImBuf *ibuf = data->ibuf; diff --git a/source/blender/modifiers/intern/MOD_displace.c b/source/blender/modifiers/intern/MOD_displace.c index bb212b003c6..1b5c48f1074 100644 --- a/source/blender/modifiers/intern/MOD_displace.c +++ b/source/blender/modifiers/intern/MOD_displace.c @@ -213,7 +213,10 @@ typedef struct DisplaceUserdata { float (*vert_clnors)[3]; } DisplaceUserdata; -static void displaceModifier_do_task(void *userdata, const int iter, const ParallelRangeTLS *UNUSED(tls)) +static void displaceModifier_do_task( + void *__restrict userdata, + const int iter, + const ParallelRangeTLS *__restrict UNUSED(tls)) { DisplaceUserdata *data = (DisplaceUserdata *)userdata; DisplaceModifierData *dmd = data->dmd; diff --git a/source/blender/modifiers/intern/MOD_meshdeform.c b/source/blender/modifiers/intern/MOD_meshdeform.c index 311dd266feb..5e878f28e25 100644 --- a/source/blender/modifiers/intern/MOD_meshdeform.c +++ b/source/blender/modifiers/intern/MOD_meshdeform.c @@ -234,8 +234,10 @@ typedef struct MeshdeformUserdata { float (*icagemat)[3]; } MeshdeformUserdata; -static void meshdeform_vert_task(void *userdata, const int iter, - const ParallelRangeTLS *UNUSED(tls)) +static void meshdeform_vert_task( + void *__restrict userdata, + const int iter, + const ParallelRangeTLS *__restrict UNUSED(tls)) { MeshdeformUserdata *data = userdata; /*const*/ MeshDeformModifierData *mmd = data->mmd; diff --git a/source/blender/modifiers/intern/MOD_ocean.c b/source/blender/modifiers/intern/MOD_ocean.c index 47d68d519fa..a9c4afcc0af 100644 --- a/source/blender/modifiers/intern/MOD_ocean.c +++ b/source/blender/modifiers/intern/MOD_ocean.c @@ -261,8 +261,10 @@ typedef struct GenerateOceanGeometryData { float ix, iy; } GenerateOceanGeometryData; -static void generate_ocean_geometry_vertices(void *userdata, const int y, - const ParallelRangeTLS *UNUSED(tls)) +static void generate_ocean_geometry_vertices( + void *__restrict userdata, + const int y, + const ParallelRangeTLS *__restrict UNUSED(tls)) { GenerateOceanGeometryData *gogd = userdata; int x; @@ -276,8 +278,10 @@ static void generate_ocean_geometry_vertices(void *userdata, const int y, } } -static void generate_ocean_geometry_polygons(void *userdata, const int y, - const ParallelRangeTLS *UNUSED(tls)) +static void generate_ocean_geometry_polygons( + void *__restrict userdata, + const int y, + const ParallelRangeTLS *__restrict UNUSED(tls)) { GenerateOceanGeometryData *gogd = userdata; int x; @@ -307,8 +311,10 @@ static void generate_ocean_geometry_polygons(void *userdata, const int y, } } -static void generate_ocean_geometry_uvs(void *userdata, const int y, - const ParallelRangeTLS *UNUSED(tls)) +static void generate_ocean_geometry_uvs( + void *__restrict userdata, + const int y, + const ParallelRangeTLS *__restrict UNUSED(tls)) { GenerateOceanGeometryData *gogd = userdata; int x; diff --git a/source/blender/modifiers/intern/MOD_surfacedeform.c b/source/blender/modifiers/intern/MOD_surfacedeform.c index 99533289bce..17e6de4c34b 100644 --- a/source/blender/modifiers/intern/MOD_surfacedeform.c +++ b/source/blender/modifiers/intern/MOD_surfacedeform.c @@ -753,7 +753,10 @@ BLI_INLINE float computeNormalDisplacement(const float point_co[3], const float return normal_dist; } -static void bindVert(void *userdata, const int index, const ParallelRangeTLS *UNUSED(tls)) +static void bindVert( + void *__restrict userdata, + const int index, + const ParallelRangeTLS *__restrict UNUSED(tls)) { SDefBindCalcData * const data = (SDefBindCalcData *)userdata; float point_co[3]; @@ -1054,7 +1057,10 @@ static bool surfacedeformBind(SurfaceDeformModifierData *smd, float (*vertexCos) return data.success == 1; } -static void deformVert(void *userdata, const int index, const ParallelRangeTLS *UNUSED(tls)) +static void deformVert( + void *__restrict userdata, + const int index, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const SDefDeformData * const data = (SDefDeformData *)userdata; const SDefBind *sdbind = data->bind_verts[index].binds; diff --git a/source/blender/modifiers/intern/MOD_uvwarp.c b/source/blender/modifiers/intern/MOD_uvwarp.c index 61e57152dfd..b263f792741 100644 --- a/source/blender/modifiers/intern/MOD_uvwarp.c +++ b/source/blender/modifiers/intern/MOD_uvwarp.c @@ -112,7 +112,10 @@ typedef struct UVWarpData { int axis_v; } UVWarpData; -static void uv_warp_compute(void *userdata, const int i, const ParallelRangeTLS *UNUSED(tls)) +static void uv_warp_compute( + void *__restrict userdata, + const int i, + const ParallelRangeTLS *__restrict UNUSED(tls)) { const UVWarpData *data = userdata; diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c index 1239ecce7ca..16ed743a1c9 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.c +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c @@ -91,7 +91,10 @@ typedef struct Vert2GeomDataChunk { /** * Callback used by BLI_task 'for loop' helper. */ -static void vert2geom_task_cb_ex(void *userdata, const int iter, const ParallelRangeTLS *tls) +static void vert2geom_task_cb_ex( + void *__restrict userdata, + const int iter, + const ParallelRangeTLS *__restrict tls) { Vert2GeomData *data = userdata; Vert2GeomDataChunk *data_chunk = tls->userdata_chunk; diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c index 917166f75a9..b75d996ff27 100644 --- a/source/blender/render/intern/source/pointdensity.c +++ b/source/blender/render/intern/source/pointdensity.c @@ -1007,8 +1007,10 @@ typedef struct SampleCallbackData { float *values; } SampleCallbackData; -static void point_density_sample_func(void *data_v, const int iter, - const ParallelRangeTLS *UNUSED(tls)) +static void point_density_sample_func( + void *__restrict data_v, + const int iter, + const ParallelRangeTLS *__restrict UNUSED(tls)) { SampleCallbackData *data = (SampleCallbackData *)data_v; |