|
Blender V5.3
|
Namespaces | |
| namespace | detail |
| namespace | enumerable_thread_specific_utils |
Classes | |
| class | EnumerableThreadSpecific |
| class | TaskSizeHints |
Functions | |
| template<typename Range, typename Function> | |
| void | parallel_for_each (Range &&range, const Function &function) |
| template<typename Function> | |
| void | parallel_for (const IndexRange range, const int64_t grain_size, const Function &function, const TaskSizeHints &size_hints=detail::TaskSizeHints_Static(1)) |
| IndexRange | align_sub_range (const IndexRange unaligned_range, const int64_t alignment, const IndexRange global_range) |
| template<typename Function> | |
| void | parallel_for_aligned (const IndexRange range, const int64_t grain_size, const int64_t alignment, const Function &function) |
| template<typename Value, typename Function, typename Reduction> | |
| Value | parallel_reduce (IndexRange range, int64_t grain_size, const Value &identity, const Function &function, const Reduction &reduction) |
| template<typename Value, typename Function, typename Reduction> | |
| Value | parallel_reduce_aligned (const IndexRange range, const int64_t grain_size, const int64_t alignment, const Value &identity, const Function &function, const Reduction &reduction) |
| template<typename Value, typename Function, typename Reduction> | |
| Value | parallel_deterministic_reduce (IndexRange range, int64_t grain_size, const Value &identity, const Function &function, const Reduction &reduction) |
| template<typename... Functions> | |
| void | parallel_invoke (Functions &&...functions) |
| template<typename... Functions> | |
| void | parallel_invoke (const bool use_threading, Functions &&...functions) |
| template<typename Function> | |
| auto | isolate_task (const Function &function) |
| template<typename Function> | |
| void | max_threads_task (const int max_threads, const Function &function) |
| template<typename Function> | |
| void | memory_bandwidth_bound_task (const int64_t approximate_bytes_touched, const Function &function) |
| bool | use_single_thread (const TaskSizeHints &size_hints, const IndexRange range, const int64_t threshold) |
| template<typename Fn> | |
| auto | individual_task_sizes (Fn &&fn, const std::optional< int64_t > full_size=std::nullopt) |
| template<typename Fn> | |
| auto | accumulated_task_sizes (Fn &&fn) |
|
inline |
Very similar to individual_task_sizes, but should be used if one can very efficiently compute the accumulated task size (in O(1) time). This is often the case when e.g. working with OffsetIndices.
| fn | A function that returns the accumulated size for a range of tasks: (IndexRange indices) -> int64_t. |
Definition at line 177 of file BLI_task_size_hints.hh.
References accumulated_task_sizes().
Referenced by accumulated_task_sizes(), blender::nodes::node_geo_cluster_by_distance_cc::ClusterByDistanceFieldInput::get_varray_for_context(), and blender::draw::grease_pencil_geom_batch_ensure().
|
inline |
Move the sub-range boundaries down to the next aligned index. The "global" begin and end remain fixed though.
Definition at line 89 of file BLI_task.hh.
References align_sub_range(), blender::IndexRange::from_begin_end(), blender::IndexRange::one_after_last(), and blender::IndexRange::start().
Referenced by align_sub_range(), parallel_for_aligned(), and parallel_reduce_aligned().
|
inline |
Specify how large the task at each index is with a callback. This is especially useful if the size of each individual task can be very different. Specifying the size allows the scheduler to distribute the work across threads more equally.
| fn | A function that returns the size for a single task: (int64_t index) -> int64_t. |
| full_size | The (approximate) accumulated size of all tasks. This is optional and should only be passed in if it is trivially accessible already. |
Definition at line 157 of file BLI_task_size_hints.hh.
References individual_task_sizes().
Referenced by blender::nodes::node_geo_proximity_cc::ProximityFunction::build_group_trees(), individual_task_sizes(), and blender::nodes::node_geo_sample_nearest_surface_cc::SampleNearestSurfaceFunction::prepare_for_execution().
|
inline |
See BLI_task_isolate for a description of what isolating a task means.
Definition at line 224 of file BLI_task.hh.
References isolate_task().
Referenced by blender::BKE_mesh_wrapper_ensure_mdata(), blender::BKE_mesh_wrapper_ensure_subdivision(), blender::ed::sculpt_paint::undo::PositionUndoStorage::compress_fn(), blender::index_mask::get_static_index_mask_for_min_size(), blender::memory_cache::invalidate_outdated_caches_if_necessary(), isolate_task(), blender::ed::sculpt_paint::undo::restore_position_from_undo_step(), blender::bke::greasepencil::update_triangle_and_offsets_cache(), and blender::write_result_func().
|
inline |
Runs the function with at most #max_threads threads participating in parallel work, including the calling thread.
Definition at line 239 of file BLI_task.hh.
References max_threads_task(), and blender::threading::detail::max_threads_task_impl().
Referenced by blender::TreeBuilder< T >::build(), blender::array_utils::count_indices_thread_local(), and max_threads_task().
|
inline |
Should surround parallel code that is highly bandwidth intensive, e.g. it just fills a buffer with no or just few additional operations. If the buffers are large, it's beneficial to limit the number of threads doing the work because that just creates more overhead on the hardware level and doesn't provide a notable performance benefit beyond a certain point.
Definition at line 251 of file BLI_task.hh.
References memory_bandwidth_bound_task(), and blender::threading::detail::memory_bandwidth_bound_task_impl().
Referenced by blender::geometry::calculate_uvs(), blender::compositor::convolve(), blender::geometry::create_grid_mesh(), blender::geometry::create_line_mesh(), blender::draw::extract_edituv_stretch_area(), blender::draw::extract_lines_mesh(), blender::draw::extract_orco(), blender::draw::extract_points_mesh(), blender::draw::extract_uv_maps(), blender::draw::extract_vert_positions_mesh(), blender::offset_indices::fill_constant_group_size(), blender::draw::fill_loose_lines_ibo(), blender::offset_indices::gather_group_sizes(), blender::GPU_indexbuf_build_from_memory(), blender::io::csv::import_csv_as_pointcloud(), memory_bandwidth_bound_task(), blender::geometry::realize_instances(), blender::bke::set_bools(), and blender::bke::subdiv::subdiv_mesh_face().
|
inline |
Definition at line 170 of file BLI_task.hh.
References blender::IndexRange::first(), blender::IndexRange::one_after_last(), parallel_deterministic_reduce(), blender::lazy_threading::send_hint(), blender::IndexRange::size(), and UNUSED_VARS.
Referenced by blender::dot_lfvector(), blender::nodes::node_geo_scale_elements_cc::gather_mean(), and parallel_deterministic_reduce().
|
inline |
Executes the given function for sub-ranges of the given range, potentially in parallel. This is the main primitive for parallelizing code.
| range | The indices that should be iterated over in parallel. |
| grain_size | The approximate amount of work that should be scheduled at once. For example of the range is [0 - 1000] and the grain size is 200, then the function will be called 5 times with [0 - 200], [201 - 400], ... (approximately). The size_hints parameter can be used to adjust how the work is split up if the tasks have different sizes. |
| function | A callback that actually does the work in parallel. It should have one IndexRange parameter. |
| size_hints | Can be used to specify the size of the tasks relative to each other and the grain size. If all tasks have approximately the same size, this can be ignored. Otherwise, one can use threading::individual_task_sizes(...) or threading::accumulated_task_sizes(...). If the grain size is e.g. 200 and each task has the size 100, then only two tasks will be scheduled at once. |
Definition at line 69 of file BLI_task.hh.
References blender::IndexRange::is_empty(), parallel_for(), blender::threading::detail::parallel_for_impl(), and use_single_thread().
Referenced by blender::draw::accumululate_material_counts_bm(), blender::bke::adapt_curve_domain_point_to_curve_impl(), blender::bke::adapt_mesh_domain_corner_to_point_impl(), blender::bke::adapt_mesh_domain_corner_to_point_impl(), blender::bke::adapt_mesh_domain_edge_to_corner_impl(), blender::bke::adapt_mesh_domain_edge_to_point_impl(), blender::bke::adapt_mesh_domain_face_to_edge_impl(), blender::bke::pbvh::uv_islands::UVIslandsMask::add(), blender::ed::object::add_arrays(), blender::geometry::add_curves_on_mesh(), blender::nodes::node_geo_string_to_curves_cc::add_instances_from_handles(), blender::seq::apply_effect_op(), blender::ed::greasepencil::apply_mask_as_segment_selection(), blender::seq::apply_modifier_op(), blender::ed::object::apply_objects_internal(), blender::ed::transform::apply_shear_value(), blender::apply_to_curves_point_selection(), blender::ed::transform::apply_value_impl(), blender::ed::transform::applyPushPull(), blender::ed::transform::applyResize(), blender::ed::transform::applyRotationValue(), blender::ed::transform::applyShrinkFatten(), blender::ed::transform::applySkinResize(), blender::ed::transform::applyToSphere(), blender::ed::transform::applyTrackballValue(), blender::ed::transform::applyTranslationValue(), blender::bke::armature_deform_coords(), blender::AtomicDisjointSet::AtomicDisjointSet(), blender::ed::greasepencil::bake_grease_pencil_animation_exec(), blender::ed::transform::Bend(), blender::BKE_editmesh_uv_tangents_calc(), blender::BKE_fcurve_handles_recalc_ex(), blender::BKE_image_buf_fill_checker(), blender::BKE_image_buf_fill_checker_color(), blender::BKE_image_buf_fill_color(), blender::BKE_mesh_legacy_convert_edges_to_generic(), blender::BKE_mesh_legacy_convert_flags_to_hide_layers(), blender::BKE_mesh_legacy_convert_flags_to_selection_layers(), blender::BKE_mesh_legacy_convert_loops_to_corners(), blender::BKE_mesh_legacy_convert_mpoly_to_material_indices(), blender::BKE_mesh_legacy_convert_polys_to_offsets(), blender::BKE_mesh_legacy_convert_uvs_to_generic(), blender::BKE_mesh_legacy_convert_verts_to_positions(), blender::BKE_mesh_legacy_sharp_edges_from_flags(), blender::BKE_mesh_legacy_sharp_faces_from_flags(), blender::BKE_mesh_legacy_uv_seam_from_flags(), blender::BKE_mesh_merge_customdata_for_apply_modifier(), blender::BKE_mesh_uv_vert_map_create(), blender::BKE_object_foreach_display_point(), blender::BKE_sculpt_sync_face_visibility_to_grids(), blender::seq::blur_isolate_highlights(), blender::nodes::node_geo_blur_attribute_cc::blur_on_curve_exec(), blender::nodes::node_geo_blur_attribute_cc::blur_on_mesh_exec(), blender::draw::bm_corner_indices_create(), blender::BM_mesh_normals_update_with_partial_ex(), blender::bm_to_mesh_edges(), blender::bm_to_mesh_faces(), blender::bm_to_mesh_loops(), blender::bm_to_mesh_verts(), blender::draw::build_bmesh_face_offsets(), blender::nodes::node_geo_blur_attribute_cc::build_corner_to_corner_by_vert_map(), blender::nodes::node_geo_blur_attribute_cc::build_edge_to_edge_by_vert_map(), blender::nodes::node_geo_blur_attribute_cc::build_face_to_face_by_edge_map(), blender::nodes::node_geo_proximity_cc::ProximityFunction::build_group_trees(), blender::nodes::node_geo_interpolate_curves_cc::build_kdtrees_for_root_positions(), blender::bke::pbvh::build_mesh_leaf_nodes(), blender::build_poly_connections(), blender::offset_indices::build_reverse_map(), blender::io::hydra::build_submeshes(), blender::bke::pbvh::uv_islands::build_uv_islands(), blender::nodes::node_geo_blur_attribute_cc::build_vert_to_vert_by_edge_map(), blender::bke::build_vertex_groups_for_leaves(), blender::io::usd::calc_curve_offsets(), blender::nodes::node_geo_dual_mesh_cc::calc_dual_mesh(), blender::ed::sculpt_paint::filter::calc_limit_surface_positions(), blender::draw::pbvh::calc_material_indices(), blender::geometry::calc_new_edges(), blender::ed::curves::calc_new_offsets(), blender::draw::pbvh::calc_node_uvs_for_flat_layout(), blender::draw::pbvh::calc_node_uvs_for_standard_layout(), blender::geometry::calc_position_with_interpolation(), blender::geometry::calc_position_without_interpolation(), blender::geometry::calc_radius_with_interpolation(), blender::AtomicDisjointSet::calc_reduced_ids(), blender::bke::pbvh::calc_shared_vert_normals(), blender::ed::sculpt_paint::islands::calc_topology_islands_grids(), blender::nodes::node_geo_distribute_points_on_faces_cc::calc_tri_point_offsets(), blender::nodes::node_geo_distribute_points_on_faces_cc::calc_tri_point_offsets(), blender::draw::pbvh::calc_use_flat_layout(), blender::bke::mesh::calc_uv_tangents(), blender::nodes::node_geo_uv_tangent_cc::calc_uv_tangents_simple(), blender::geometry::calc_vert_ranges_per_old_vert(), blender::bke::curves::bezier::calculate_auto_handles(), blender::bke::curves::nurbs::calculate_basis_cache(), blender::bke::CurvesGeometry::calculate_bezier_auto_handles(), blender::geometry::calculate_bezier_handles_bezier_mode(), blender::geometry::calculate_bezier_handles_poly_mode(), blender::bke::curves::bezier::calculate_evaluated_positions(), blender::geometry::calculate_fillet_positions(), blender::nodes::node_geo_curve_spline_parameter_cc::calculate_point_lengths(), blender::nodes::node_geo_curve_fill_cc::cdts_to_mesh(), blender::seq::composite_shadow(), blender::ed::sculpt_paint::undo::PositionUndoStorage::compress_fn(), blender::nodes::node_geo_distribute_points_on_faces_cc::compute_attribute_outputs(), blender::ed::greasepencil::segment::compute_bounding_boxes(), blender::ed::greasepencil::segment::compute_bounding_boxes(), blender::nodes::node_geo_distribute_points_on_faces_cc::compute_normal_outputs(), blender::nodes::node_geo_interpolate_curves_cc::compute_point_counts_per_child(), blender::compositor::compute_preview_cpu(), blender::compositor::compute_preview_gpu(), blender::nodes::node_geo_distribute_points_on_faces_cc::compute_rotation_output(), blender::array_utils::compute_sum(), blender::ed::greasepencil::compute_topology_change(), blender::nodes::node_geo_input_mesh_face_neighbors_cc::construct_neighbor_count_varray(), blender::io::spz::convert_axis_to_blender(), blender::gpu::convert_buffer(), blender::bke::greasepencil::convert::convert_grease_pencil_drawing_material_stroke_fill_toggle_to_attributes(), blender::gpu::convert_normals_impl(), blender::compositor::convolve(), blender::array_utils::copy(), blender::array_utils::copy(), blender::geometry::copy_generic_attributes_to_result(), blender::bke::copy_indices_to_offset_ranges(), blender::ed::object::copy_transformed_radii(), blender::bke::mesh::corner_tris_calc_face_indices(), blender::bke::mesh::corner_tris_calc_impl(), blender::array_utils::count_indices_atomics(), blender::array_utils::count_indices_thread_local(), blender::ed::greasepencil::segment::create_connections_from_curves(), blender::ed::greasepencil::trim::create_curves_from_segments(), blender::ed::greasepencil::create_curves_outline(), blender::geometry::create_id_index_map(), blender::draw::create_lines_ibo_no_cyclic(), blender::draw::create_lines_ibo_with_cyclic(), blender::geometry::create_merged_mesh(), blender::geometry::create_result_ids(), blender::ed::transform::pointcloud::createTransPointCloudVerts(), blender::bke::curve_normal_point_domain(), blender::geometry::curve_simplify(), blender::nodes::node_geo_input_tangent_cc::curve_tangent_point_domain(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::curves_intersections_and_points_sides(), blender::bke::greasepencil::curves_mask_to_shapes(), blender::ed::greasepencil::curves_merge_by_distance(), blender::ed::greasepencil::curves_merge_endpoints_by_distance(), blender::ed::greasepencil::segment::cut_caps(), blender::nodes::node_geo_deform_curves_on_surface_cc::deform_curves(), blender::deform_drawing(), blender::deform_drawing(), blender::ed::greasepencil::delaunay_fill_strokes(), blender::bke::pbvh::uv_islands::UVIslandsMask::dilate(), blender::bke::pbvh::uv_islands::dilate_x(), blender::bke::pbvh::uv_islands::dilate_y(), blender::display_buffer_apply_threaded(), blender::displist_fill_cdt(), blender::nodes::node_geo_curve_fill_cc::do_cdt(), blender::seq::do_gaussian_blur_effect(), blender::seq::do_glow_effect_byte(), blender::nodes::node_geo_curve_fill_cc::do_group_aware_cdt(), blender::ed::sculpt_paint::image::do_paint_pixels(), blender::ed::sculpt_paint::color::do_smear_brush(), blender::seq::do_solid_color(), blender::seq::do_wipe_effect(), slim::doublearea(), slim::doublearea_sort3(), blender::seq::draw_text_outline(), blender::seq::draw_text_shadow(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_curves(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_edges(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_points_grease_pencil(), blender::ed_curves_select_pick(), blender::ed_grease_pencil_select_pick(), blender::ED_mesh_split_faces(), blender::nodes::node_geo_edge_paths_to_selection_cc::edge_paths_to_selection(), blender::draw::GSplatEvalCache::ensure_builtin_buffers(), blender::bke::CurvesGeometry::ensure_evaluated_lengths(), blender::fn::evaluate_fields(), blender::animrig::evaluate_keyframe_data(), blender::index_mask::evaluate_short_unknown_segments_exactly(), blender::bke::CurvesGeometry::evaluated_normals(), blender::bke::CurvesGeometry::evaluated_tangents(), blender::ed::curves::set_handle_type::exec(), blender::ed::curves::subdivide::exec(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::execute(), blender::ed::greasepencil::execute_carver_on_drawing(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_fog_glow(), blender::nodes::execute_multi_function_on_value_variant__list_individual(), blender::geometry::execute_realize_curve_task(), blender::geometry::execute_realize_mesh_task(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_simple_star_anti_diagonal_pass_cpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_simple_star_diagonal_pass_cpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_simple_star_horizontal_pass_cpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_simple_star_vertical_pass_cpu(), blender::nodes::node_composite_dilate_erode_cc::DilateErodeOperation::execute_step_pass_cpu(), blender::ed::greasepencil::execute_trim_on_drawing(), blender::geometry::extend_curves(), blender::draw::extract_corner_normals_bm(), blender::draw::extract_corner_normals_mesh(), blender::draw::extract_edge_factor_bm(), blender::draw::extract_edge_index_bm(), blender::draw::extract_edit_data_bm(), blender::draw::extract_edit_data_mesh(), blender::draw::extract_edit_flags_bm(), blender::draw::extract_edit_subdiv_data_bm(), blender::draw::extract_edit_subdiv_data_mesh(), blender::draw::extract_edituv_data_bm(), blender::draw::extract_edituv_data_mesh(), blender::draw::extract_edituv_stretch_area(), blender::draw::extract_edituv_subdiv_data_bm(), blender::draw::extract_edituv_subdiv_data_mesh(), blender::draw::extract_edituv_tris_bm(), blender::draw::extract_face_dot_normals_bm(), blender::draw::extract_face_dot_normals_mesh(), blender::draw::extract_face_dot_positions_bm(), blender::draw::extract_face_dot_positions_mesh(), blender::draw::extract_face_dots_edituv_data(), blender::draw::extract_face_dots_uv_bm(), blender::draw::extract_face_dots_uv_mesh(), blender::draw::extract_face_index_bm(), blender::draw::extract_face_index_mesh(), blender::draw::extract_face_normals_bm(), blender::draw::extract_lines_paint_mask(), blender::draw::extract_lines_paint_mask_subdiv(), blender::draw::extract_orco(), blender::draw::extract_paint_overlay_flags(), blender::draw::extract_sculpt_data(), blender::draw::extract_sculpt_data_subdiv(), blender::draw::extract_tris_bmesh(), blender::draw::extract_tris_mesh(), blender::draw::extract_vert_index_bm(), blender::draw::extract_vert_normals_bm(), blender::draw::extract_vert_normals_bm(), blender::draw::extract_vert_positions_bm(), blender::draw::extract_weights_bm(), blender::draw::extract_weights_mesh(), blender::ed::curves::extrude_curves(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_face_regions(), blender::geometry::face_keys_to_face_indices(), blender::draw::face_offsets_ensure(), blender::bke::greasepencil::fill_cache_from_fill_ids(), blender::nodes::node_geo_curve_fill_cc::fill_curve_vert_indices(), blender::ed::transform::curves::fill_map(), blender::seq::fill_rect_alpha_under(), blender::nodes::node_geo_curve_to_points_cc::fill_rotation_attribute(), blender::geometry::find_affected_verts(), blender::bke::pbvh::pixels::Rows::find_copy_source(), blender::geometry::find_curve_neighbors(), blender::bke::find_duplicate_faces(), blender::bke::find_nearest_edges(), blender::bke::find_nearest_faces(), blender::bke::find_nearest_tris_parallel(), blender::nodes::node_geo_interpolate_curves_cc::find_neighbor_guides(), blender::nodes::node_geo_index_of_nearest_cc::find_neighbors(), blender::bke::pbvh::uv_islands::find_triangles_near_border(), blender::geometry::finish_rows(), blender::geometry::fit_poly_to_bezier_curves(), blender::io::csv::flatten_valid_attribute_chunks(), blender::compositor::FogGlowKernel::FogGlowKernel(), blender::bke::foreach_curve_combination(), blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::foreach_editable_drawing(), blender::index_mask::IndexMask::foreach_index(), blender::index_mask::IndexMask::foreach_index_optimized(), blender::geometry::foreach_real_geometry(), blender::index_mask::IndexMask::foreach_segment(), blender::index_mask::IndexMask::foreach_segment_optimized(), blender::bke::pbvh::Tree::from_bmesh(), blender::bke::pbvh::Tree::from_grids(), blender::index_mask::IndexMask::from_group_ids(), blender::index_mask::IndexMask::from_indices(), blender::bke::pbvh::Tree::from_mesh(), blender::array_utils::gather(), blender::array_utils::gather_group_to_group(), blender::bke::subdiv::gather_manifold_sharpness(), blender::nodes::node_geo_scale_elements_cc::gather_means(), blender::geometry::gaussian_blur_1D(), blender::generate_curves(), blender::nodes::node_geo_interpolate_curves_cc::generate_interpolated_curves(), blender::ed::greasepencil::get_all_triangle_adjacency(), blender::ed::greasepencil::get_all_triangle_edges(), blender::ed::greasepencil::get_edge_weights(), blender::modifier::greasepencil::get_influence_vertex_weights(), blender::ed::greasepencil::get_input_from_drawings(), blender::io::alembic::get_loop_normals(), blender::ed::greasepencil::get_points_to_dissolve(), blender::ed::greasepencil::get_root_and_tips_of_bones(), blender::index_mask::get_static_index_mask_for_min_size(), blender::ed::greasepencil::get_stroke_colors(), blender::ed::greasepencil::get_tri_max_weight(), blender::nodes::node_geo_cluster_by_distance_cc::ClusterByDistanceFieldInput::get_varray_for_context(), blender::nodes::node_geo_curve_endpoint_selection_cc::EndpointFieldInput::get_varray_for_context(), blender::nodes::node_geo_curve_spline_parameter_cc::IndexOnSplineFieldInput::get_varray_for_context(), blender::nodes::node_geo_index_of_nearest_cc::IndexOfNearestFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_cluster_by_connected_cc::ClusterByConnectedFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_mesh_island_cc::IslandCountFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_mesh_island_cc::IslandFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_shortest_edge_paths_cc::ShortestEdgePathsCostFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_shortest_edge_paths_cc::ShortestEdgePathsNextVertFieldInput::get_varray_for_context(), blender::nodes::node_geo_mesh_face_group_boundaries_cc::BoundaryFieldInput::get_varray_for_context(), blender::nodes::node_geo_uv_tangent_cc::TangentFieldInput::get_varray_for_context(), blender::nodes::node_geo_volume_cube_cc::Grid3DFieldContext::get_varray_for_input(), blender::seq::glow_blur_bitmap(), blender::grease_pencil_do_layer_adjustments(), blender::ed::sculpt_paint::grease_pencil_erase_box_exec(), blender::ed::sculpt_paint::grease_pencil_erase_lasso_exec(), blender::ed::sculpt_paint::grease_pencil_fill_overlay_delaunay_cb(), blender::draw::grease_pencil_geom_batch_ensure(), blender::ed::greasepencil::grease_pencil_stroke_carver_exec(), blender::draw::grease_pencil_wire_batch_ensure(), blender::geometry::grouped_sort(), blender::nodes::node_geo_points_to_curves_cc::grouped_sort(), blender::image_exr_from_rgb_to_bw(), blender::image_exr_opaque_alpha_buffer(), blender::ed::image_trace::image_to_bitmap(), blender::image_undosys_step_encode(), blender::IMB_alpha_under_color_byte(), blender::IMB_alpha_under_color_float(), blender::IMB_buffer_float_rgba_srgb_to_linear(), blender::IMB_byte_from_float(), blender::IMB_colormanagement_imbuf_to_float_texture(), blender::IMB_colormanagement_transform_byte_to_float(), blender::IMB_colormanagement_working_space_convert(), blender::imb_exr_write_channels(), blender::IMB_float_from_byte_ex(), blender::IMB_rectblend_threaded(), blender::IMB_saturation(), blender::IMB_transform(), blender::nodes::socket_usage_inference::infer_all_sockets_usage(), blender::ed::sculpt_paint::auto_mask::init_face_sets_masking(), blender::ed::sculpt_paint::expand::init_from_face_set_boundary(), blender::ed::sculpt_paint::greasepencil::WeightPaintOperation::init_weight_data_for_drawings(), blender::bke::subdiv::initialize_manifold_edges(), blender::seq::initialize_shadow_alpha(), blender::bke::subdiv::initialize_vert_sharpness(), blender::draw::pbvh::interpolate_corner_data_for_flat_layout(), blender::draw::pbvh::interpolate_corner_data_for_standard_layout(), blender::draw::interpolate_corners(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_attributes(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_shapes(), blender::bke::curves::bezier::interpolate_to_evaluated(), blender::bke::curves::catmull_rom::interpolate_to_evaluated(), blender::bke::curves::nurbs::interpolate_to_evaluated(), blender::bke::CurvesGeometry::interpolate_to_evaluated(), blender::bke::curves::nurbs::interpolate_to_evaluated_rational(), blender::draw::pbvh::interpolate_vert_data_for_flat_layout(), blender::draw::pbvh::interpolate_vert_data_for_standard_layout(), blender::array_utils::invert_booleans(), blender::geometry::invert_permutation(), blender::ed::curves::pen_tool::invoke_curves(), blender::geometry::join_mesh_material_indices(), blender::seq::jump_flooding_pass(), blender::key_evaluate_absolute(), blender::key_evaluate_relative_float3(), blender::bke::greasepencil::convert::legacy_gpencil_frame_to_grease_pencil_drawing(), blender::draw::Manager::load_deferred_textures(), blender::bke::pbvh::pixels::Rows::mark_pixels_effected_by_brush(), blender::bke::VArrayImpl_For_VertexWeights::materialize(), blender::geometry::merge_layers(), blender::geometry::merge_points(), blender::geometry::merge_src_to_dst_map(), blender::bke::pbvh::uv_islands::mesh_data_init_primitive_uv_island_ids(), blender::ed::object::mesh_data_to_grease_pencil(), blender::bke::mesh_edge_hide_from_vert(), blender::bke::mesh_face_hide_from_vert(), blender::bke::mesh_hide_face_flush(), blender::geometry::mesh_merge_by_distance_all(), blender::bke::mesh_skin_to_generic(), blender::bke::mesh_skin_to_legacy(), blender::bke::mesh_uv_select_to_single_attribute(), blender::geometry::mix(), blender::bke::mesh::mix_normals_corner_to_face(), blender::bke::mesh::mix_normals_corner_to_vert(), blender::bke::mesh::mix_normals_vert_to_face(), blender::geometry::mix_vertex_groups(), blender::geometry::mix_with_indices(), blender::ed::curves::pen_tool::PenToolOperation::modal(), blender::nodes::node_composite_vector_blur_cc::motion_blur_cpu(), blender::seq::multiply_ibuf(), blender::multires_reshape_assign_final_coords_from_ccg(), blender::nodes::node_geo_closure_to_list_cc::node_geo_exec(), blender::ed::sculpt_paint::auto_mask::normal_occlusion_automasking_fill(), blender::bke::normalize_vecs(), blender::bke::mesh::normals_calc_corners(), blender::bke::mesh::normals_calc_faces(), blender::bke::mesh::normals_calc_verts(), blender::bke::CurvesGeometry::nurbs_custom_knots_by_curve(), blender::io::obj::obj_parallel_chunked_output(), blender::ed::sculpt_paint::greasepencil::CloneOperation::on_stroke_begin(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_curve_selection_projected(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_curve_selection_spherical(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_point_selection_projected(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_point_selection_spherical(), blender::paintface_select_less(), blender::paintface_select_linked_faces(), blender::paintface_select_more(), blender::paintvert_select_linked_vertices(), blender::compositor::parallel_for(), parallel_for(), parallel_for_aligned(), blender::parallel_nodes_loop_with_mirror_check(), blender::geometry::parallel_transform(), blender::nodes::node_geo_interpolate_curves_cc::parameterize_guide_curves(), blender::csv_parse::parse_csv_in_chunks(), blender::ed::curves::convert_from_particle_system::particles_to_curves(), blender::geometry::point_merge_by_distance(), blender::draw::pointcloud_extract_position_and_radius(), blender::pointcloud_select_pick(), blender::precompute_weight_values(), blender::nodes::LazyFunctionForForeachGeometryElementZone::prepare_components(), blender::nodes::node_geo_sample_nearest_surface_cc::SampleNearestSurfaceFunction::prepare_for_execution(), blender::draw::process_ibo_verts_bm(), blender::draw::process_ibo_verts_mesh(), blender::processor_transform_apply_threaded(), blender::ed::greasepencil::DrawingPlacement::project(), blender::ed::sculpt_paint::hide::propagate_vertex_visibility(), blender::ed::sculpt_paint::undo::push_nodes(), blender::string_search::StringSearchBase::query_impl(), blender::RE_bake_pixels_populate_from_objects(), blender::io::usd::USDParticleFieldReader::read_geometry(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::reduce_density_projected(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::reduce_density_spherical(), blender::ed::transform::remake_graph_transdata(), blender::ed::greasepencil::remap_material_indices(), blender::bke::remove_defgroup_index(), blender::bke::Instances::remove_unused_references(), blender::geometry::reorder_and_flip_attributes_group_to_group(), blender::geometry::reorder_attribute_groups(), blender::geometry::reorder_attributes_group_to_group(), blender::ed::greasepencil::DrawingPlacement::reproject(), blender::ed::sculpt_paint::undo::restore_position_grids(), blender::ed::sculpt_paint::undo::restore_position_mesh(), blender::offset_indices::reverse_indices_in_groups_atomic(), blender::offset_indices::reverse_indices_in_groups_counting(), blender::rotate_pixels(), blender::length_parameterize::sample_at_lengths(), blender::nodes::node_geo_distribute_points_on_faces_cc::sample_bary_coords(), blender::ed::sculpt_paint::greasepencil::sample_curve_2d(), blender::geometry::ReverseUVSampler::sample_many(), blender::length_parameterize::sample_uniform(), blender::length_parameterize::sample_uniform_reverse(), blender::scale_bilinear(), blender::scale_down_x_func(), blender::scale_down_y_func(), blender::scale_nearest_func(), blender::nodes::node_geo_scale_elements_cc::scale_on_axis(), blender::nodes::node_geo_scale_elements_cc::scale_uniformly(), blender::scale_up_x_func(), blender::scale_up_y_func(), blender::ui::searchbox_size_x_from_items(), blender::ed::curves::separate_exec(), blender::ed::pointcloud::separate_exec(), blender::seq::seq_render_mask(), blender::bke::VArrayImpl_For_VertexWeights::set_all(), blender::ed::greasepencil::set_start_point(), blender::bke::greasepencil::shapes_from_fill_ids(), blender::nodes::node_geo_input_shortest_edge_paths_cc::shortest_paths(), blender::shrinkwrap_calc_nearest_surface_point(), blender::shrinkwrap_calc_nearest_vertex(), blender::shrinkwrap_calc_normal_projection(), blender::ed::sculpt_paint::SlideOperationExecutor::slide(), blender::geometry::smooth_curve_positions(), blender::ed::curves::snap_curves_to_surface::snap_curves_to_surface_exec_object(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::soft_eraser(), blender::offset_indices::sort_groups(), blender::geometry::sort_tris_into_rows(), blender::ed::sculpt_paint::expand::spherical_falloff_create(), blender::nodes::node_geo_split_to_instances_cc::split_curve_groups(), blender::nodes::node_geo_split_to_instances_cc::split_instance_groups(), blender::nodes::node_geo_split_to_instances_cc::split_mesh_groups(), blender::nodes::node_geo_split_to_instances_cc::split_pointcloud_groups(), slim::squared_edge_lengths(), blender::ed::curves::undo::step_encode(), blender::ed::greasepencil::undo::step_encode(), blender::ed::pointcloud::undo::step_encode(), blender::bke::pbvh::store_bounds_orig(), blender::nodes::node_geo_interpolate_curves_cc::store_output_attributes(), blender::geometry::subdivide_attribute_linear(), blender::geometry::subdivide_bezier_positions(), blender::subdivide_drawing(), blender::compositor::summed_area_table_cpu(), blender::fftw::tbb_parallel_loop_for_fftw(), blender::tests::TEST(), blender::bke::greasepencil::Drawing::texture_matrices(), blender::geometry::threaded_copy(), blender::geometry::threaded_fill(), blender::nodes::node_geo_duplicate_elements_cc::threaded_id_offset_copy(), blender::nodes::node_geo_transfer_attributes_cc::transfer_attributes(), blender::geometry::transform_curve_edit_hints(), blender::geometry::transform_grease_pencil_edit_hints(), blender::geometry::transform_instances(), blender::math::transform_normals(), blender::math::transform_normals(), blender::math::transform_points(), blender::math::transform_points(), blender::geometry::translate_instances(), blender::bke::translate_positions(), blender::ed::object::translate_positions(), blender::geometry::translate_positions(), blender::geometry::tri_to_ordered_tri(), blender::bke::try_capture_fields_on_geometry(), blender::io::grease_pencil::GreasePencilExporter::try_get_uniform_point_width(), blender::geometry::update_corner_verts(), blender::bke::calc_edges::update_edge_indices_in_face_loops(), blender::bke::node_tree_runtime::update_logically_linked_sockets(), blender::bke::node_tree_runtime::update_sockets_by_identifier(), blender::gpu::GLTexture::update_sub(), blender::gpu::MTLTexture::update_sub(), blender::bke::greasepencil::update_triangle_and_offsets_cache(), blender::ed::sculpt_paint::use_add_density_mode(), blender::bke::validate_vertex_groups(), blender::versioning_grease_pencil_stroke_radii_scaling(), blender::ed::sculpt_paint::islands::vert_disjoint_set_to_islands(), blender::ed::sculpt_paint::expand::vert_to_face_falloff_grids(), blender::ed::sculpt_paint::expand::vert_to_face_falloff_mesh(), blender::ed::greasepencil::vertex_group_normalize_all_exec(), blender::ed::greasepencil::vertex_group_normalize_exec(), blender::ed::greasepencil::vertex_group_smooth_exec(), blender::ed::object::vgroup_grease_pencil_select_verts(), blender::ed::vse::visible_strips_ordered_get(), blender::io::obj::write_mesh_objects(), blender::write_weights_for_drawing(), and blender::fn::lazy_function::generic_graph_executor::GenericGraphExecutor::~GenericGraphExecutor().
|
inline |
Same as parallel_for but tries to make the sub-range sizes multiples of the given alignment. This can improve performance when the range is processed using vectorized and/or unrolled loops, because the fallback loop that processes remaining values is used less often. A disadvantage of using this instead of parallel_for is that the size differences between sub-ranges can be larger, which means that work is distributed less evenly.
Definition at line 115 of file BLI_task.hh.
References align_sub_range(), parallel_for(), and parallel_for_aligned().
Referenced by blender::fn::multi_function::MultiFunction::call_auto(), blender::ed::sculpt_paint::expand::enabled_state_to_bitmap(), and parallel_for_aligned().
|
inline |
Definition at line 31 of file BLI_task.hh.
References parallel_for_each().
Referenced by blender::ed::greasepencil::add_armature_automatic_weights(), blender::ed::greasepencil::add_armature_envelope_weights(), blender::bke::calc_edges::add_existing_edges_to_hash_maps(), blender::bke::calc_edges::add_face_edges_to_hash_maps(), blender::apply_to_active_object(), blender::bke::calc_edges::clear_hash_tables(), blender::convert_input_to_half_rgba(), blender::io::fbx::fbx_task_run_fn(), blender::ed::sculpt_paint::greasepencil::GrabOperation::foreach_grabbed_drawing(), blender::ed::transform::gizmo_3d_foreach_selected(), blender::ed::greasepencil::gpencil_stroke_subdivide_exec(), blender::ed::greasepencil::grease_pencil_caps_set_exec(), blender::ed::greasepencil::grease_pencil_clean_loose_exec(), blender::ed::greasepencil::grease_pencil_convert_curve_type_exec(), blender::ed::greasepencil::grease_pencil_cyclical_set_exec(), blender::ed::greasepencil::grease_pencil_delete_exec(), blender::ed::greasepencil::grease_pencil_dissolve_exec(), blender::grease_pencil_do_layer_adjustments(), blender::ed::greasepencil::grease_pencil_duplicate_exec(), blender::ed::greasepencil::grease_pencil_extrude_exec(), blender::ed::greasepencil::grease_pencil_material_select_exec(), blender::ed::greasepencil::grease_pencil_outline_exec(), blender::ed::greasepencil::grease_pencil_paste_strokes_exec(), blender::ed::greasepencil::grease_pencil_remove_fill_guides_exec(), blender::ed::greasepencil::grease_pencil_reproject_exec(), blender::ed::greasepencil::grease_pencil_reset_uvs_exec(), blender::ed::greasepencil::grease_pencil_select_by_stroke_type_exec(), blender::ed::greasepencil::grease_pencil_separate_fills_exec(), blender::ed::greasepencil::grease_pencil_set_corner_type_exec(), blender::ed::greasepencil::grease_pencil_set_curve_resolution_exec(), blender::ed::greasepencil::grease_pencil_set_curve_type_exec(), blender::ed::greasepencil::grease_pencil_set_handle_type_exec(), blender::ed::greasepencil::grease_pencil_set_start_point_exec(), blender::ed::greasepencil::grease_pencil_set_stroke_type_exec(), blender::ed::greasepencil::grease_pencil_set_uniform_opacity_exec(), blender::ed::greasepencil::grease_pencil_set_uniform_thickness_exec(), blender::ed::greasepencil::grease_pencil_stroke_material_set_exec(), blender::ed::greasepencil::grease_pencil_stroke_merge_by_distance_exec(), blender::ed::greasepencil::grease_pencil_stroke_reorder_exec(), blender::ed::greasepencil::grease_pencil_stroke_simplify_exec(), blender::ed::greasepencil::grease_pencil_stroke_smooth_exec(), blender::ed::greasepencil::grease_pencil_stroke_split_exec(), blender::ed::greasepencil::grease_pencil_stroke_switch_direction_exec(), blender::ed::greasepencil::grease_pencil_texture_gradient_exec(), blender::ed::greasepencil::grease_pencil_vertex_paint_brightness_contrast_exec(), blender::ed::greasepencil::grease_pencil_vertex_paint_hsv_exec(), blender::ed::greasepencil::grease_pencil_vertex_paint_invert_exec(), blender::ed::greasepencil::grease_pencil_vertex_paint_levels_exec(), blender::ed::greasepencil::grease_pencil_vertex_paint_reset_exec(), blender::ed::greasepencil::grease_pencil_vertex_paint_set_exec(), blender::ed::greasepencil::grease_pencil_weight_invert_exec(), blender::io::fbx::import_meshes(), blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::init_auto_masking(), blender::bke::calc_edges::map_edge_to_span_index(), blender::draw::mesh_buffer_cache_create_requested(), blender::bke::mesh_calc_edges(), blender::modify_geometry_set(), blender::ed::sculpt_paint::greasepencil::GrabOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::TintOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::AverageWeightPaintOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::BlurWeightPaintOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::DrawWeightPaintOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::SmearWeightPaintOperation::on_stroke_extended(), parallel_for_each(), blender::bke::calc_edges::reserve_hash_maps(), blender::ed::greasepencil::select_all_exec(), blender::ed::greasepencil::select_alternate_exec(), blender::ed::greasepencil::select_fill_exec(), blender::ed::greasepencil::select_linked_exec(), blender::ed::greasepencil::select_similar_by_layer(), blender::ed::greasepencil::select_similar_by_value(), blender::bke::calc_edges::serialize_and_initialize_deduplicated_edges(), blender::ed::greasepencil::stroke_trim_execute(), and blender::v3d_editvertex_buts().
|
inline |
Same parallel_invoke, but allows disabling threading dynamically. This is useful because when the individual functions do very little work, there is a lot of overhead from starting parallel tasks.
Definition at line 212 of file BLI_task.hh.
References parallel_invoke(), and blender::lazy_threading::send_hint().
|
inline |
Execute all of the provided functions. The functions might be executed in parallel or in serial or some combination of both.
Definition at line 197 of file BLI_task.hh.
References parallel_invoke().
Referenced by blender::BM_mesh_bm_to_me(), blender::bke::calculate_result_offsets(), blender::geometry::create_uv_sphere_mesh(), blender::bke::curves_copy_point_selection(), blender::nodes::node_geo_deform_curves_on_surface_cc::deform_curves(), blender::bke::node_tree_runtime::ensure_topology_cache(), blender::io::csv::import_csv_as_pointcloud(), blender::mesh_bm_to_me_compact(), blender::geometry::mesh_copy_selection(), blender::geometry::mesh_copy_selection_keep_verts(), blender::mul_bfmatrix_lfvector(), blender::threading::detail::parallel_for_impl_accumulated_size_lookup(), parallel_invoke(), parallel_invoke(), blender::ed::sculpt_paint::DensityAddOperationExecutor::prepare_curve_roots_kdtrees(), blender::geometry::remap_verts(), blender::ed::sculpt_paint::select_grow::select_grow_invoke_per_curve(), blender::TEST(), blender::um_arraystore_compact(), and blender::bke::pbvh::update_normals_mesh().
|
inline |
Definition at line 127 of file BLI_task.hh.
References blender::IndexRange::first(), blender::IndexRange::one_after_last(), parallel_reduce(), blender::lazy_threading::send_hint(), blender::IndexRange::size(), and UNUSED_VARS.
Referenced by blender::draw::accumululate_material_counts_mesh(), blender::animrig::assigned_action_has_keyframe_at(), blender::ed::sculpt_paint::average_mask_border_position(), blender::ed::sculpt_paint::average_unmasked_position(), blender::BKE_mesh_legacy_convert_uvs_to_generic(), blender::array_utils::booleans_mix_calc(), blender::bounds_min_max_with_transform(), blender::bke::pbvh::build_nodes_recursive_grids(), blender::bke::pbvh::build_nodes_recursive_mesh(), blender::ed::sculpt_paint::calc_area_center(), blender::ed::sculpt_paint::calc_area_normal(), blender::ed::sculpt_paint::calc_area_normal_and_center(), blender::ed::vse::ScopeHistogram::calc_from_ibuf(), blender::geometry::calc_single_value_material_index(), blender::calculate_average_weight(), blender::bke::calculate_type_counts(), blender::draw::compute_area_ratio(), blender::bke::compute_local_mesh_groups(), blender::array_utils::contains(), blender::array_utils::count_booleans(), blender::AtomicDisjointSet::count_sets(), blender::bke::curve_types_are_valid(), blender::ed::sculpt_paint::color::do_paint_brush(), blender::dynamics_step(), blender::ed_curves_select_pick(), blender::ed_grease_pencil_select_pick(), blender::ed::sculpt_paint::fake_neighbor_search(), blender::ed::curves::find_closest_curve(), blender::ed::curves::find_closest_curve_to_screen_co(), blender::ed::curves::find_closest_point_to_screen_co(), blender::ed::pointcloud::find_closest_point_to_screen_co(), blender::ed::sculpt_paint::find_curves_brush_position(), blender::geometry::find_duplicate_edges(), blender::ed::sculpt_paint::face_set::find_next_available_id(), blender::bke::pbvh::Tree::from_grids(), blender::bke::pbvh::Tree::from_mesh(), blender::ed::sculpt_paint::pose::grow_pose_factor(), blender::array_utils::indices_are_range(), blender::init_curves_point_selection_status(), blender::init_curves_selection_status(), blender::init_status_from_attribute(), blender::ed::greasepencil::boolean::WindingState::is_in_shapes(), blender::bounds::max(), blender::array_utils::max_element_index(), blender::array_utils::max_element_index(), blender::bounds::min_max(), blender::bounds::min_max(), blender::bounds::min_max(), blender::bounds::min_max_with_radii(), blender::ed::sculpt_paint::nearest_vert_calc_bmesh(), blender::ed::sculpt_paint::nearest_vert_calc_grids(), blender::ed::sculpt_paint::nearest_vert_calc_mesh(), blender::compositor::parallel_reduce(), blender::compositor::parallel_reduce(), parallel_reduce(), parallel_reduce_aligned(), blender::bke::partition_faces_recursively(), blender::pointcloud_select_pick(), blender::ed::sculpt_paint::undo::push_end_ex(), blender::ed::sculpt_paint::brushes::sample_surface(), blender::nodes::node_geo_set_curve_handles_cc::set_position_in_component(), blender::stats_object_edit(), blender::seq::tonemap_calc_input_luminance(), blender::ed::mesh::try_join_single_value_attribute(), blender::geometry::try_join_single_value_attribute(), blender::geometry::try_join_single_value_attribute(), blender::ed::sculpt_paint::mask::try_remove_mask_mesh(), blender::ed::sculpt_paint::expand::update_max_face_falloff_factor(), blender::ed::sculpt_paint::expand::update_max_vert_falloff_value(), blender::v3d_editvertex_buts(), blender::nodes::node_geo_construct_curves_cc::validate_inputs(), blender::ed::greasepencil::vertex_group_normalize_exec(), blender::view3d_panel_curve_data(), blender::ed::greasepencil::weight_sample_invoke(), and blender::geometry::weld_face_corner_ctx_setup_collapsed_and_split().
|
inline |
Definition at line 151 of file BLI_task.hh.
References align_sub_range(), parallel_reduce(), and parallel_reduce_aligned().
Referenced by parallel_reduce_aligned().
|
inline |
Definition at line 110 of file BLI_task_size_hints.hh.
References blender::threading::TaskSizeHints::AccumulatedLookup, BLI_assert_unreachable, blender::threading::TaskSizeHints::IndividualLookup, blender::IndexRange::size(), blender::threading::TaskSizeHints::Static, blender::threading::TaskSizeHints::type, and use_single_thread().
Referenced by parallel_for(), and use_single_thread().