Geometry Nodes: improve parallelization in Delete/Separate Geometry node #104563
|
@ -41,7 +41,7 @@ static void copy_data_based_on_map(const Span<T> src,
|
|||
/**
|
||||
* Copies the attributes with a domain in `domains` to `result_component`.
|
||||
*/
|
||||
BLI_NOINLINE static void copy_attributes(const Map<AttributeIDRef, AttributeKind> &attributes,
|
||||
static void copy_attributes(const Map<AttributeIDRef, AttributeKind> &attributes,
|
||||
const bke::AttributeAccessor src_attributes,
|
||||
bke::MutableAttributeAccessor dst_attributes,
|
||||
const Span<eAttrDomain> domains)
|
||||
|
@ -71,8 +71,7 @@ BLI_NOINLINE static void copy_attributes(const Map<AttributeIDRef, AttributeKind
|
|||
* For each attribute with a domain in `domains` it copies the parts of that attribute which lie in
|
||||
* the mask to `result_component`.
|
||||
*/
|
||||
BLI_NOINLINE static void copy_attributes_based_on_mask(
|
||||
const Map<AttributeIDRef, AttributeKind> &attributes,
|
||||
static void copy_attributes_based_on_mask(const Map<AttributeIDRef, AttributeKind> &attributes,
|
||||
const bke::AttributeAccessor src_attributes,
|
||||
bke::MutableAttributeAccessor dst_attributes,
|
||||
const eAttrDomain domain,
|
||||
|
@ -101,8 +100,7 @@ BLI_NOINLINE static void copy_attributes_based_on_mask(
|
|||
}
|
||||
}
|
||||
|
||||
BLI_NOINLINE static void copy_attributes_based_on_map(
|
||||
const Map<AttributeIDRef, AttributeKind> &attributes,
|
||||
static void copy_attributes_based_on_map(const Map<AttributeIDRef, AttributeKind> &attributes,
|
||||
const bke::AttributeAccessor src_attributes,
|
||||
bke::MutableAttributeAccessor dst_attributes,
|
||||
const eAttrDomain domain,
|
||||
|
@ -135,8 +133,7 @@ BLI_NOINLINE static void copy_attributes_based_on_map(
|
|||
}
|
||||
}
|
||||
|
||||
BLI_NOINLINE static void copy_face_corner_attributes(
|
||||
const Map<AttributeIDRef, AttributeKind> &attributes,
|
||||
static void copy_face_corner_attributes(const Map<AttributeIDRef, AttributeKind> &attributes,
|
||||
const bke::AttributeAccessor src_attributes,
|
||||
bke::MutableAttributeAccessor dst_attributes,
|
||||
const int selected_loops_num,
|
||||
|
@ -158,9 +155,7 @@ BLI_NOINLINE static void copy_face_corner_attributes(
|
|||
attributes, src_attributes, dst_attributes, ATTR_DOMAIN_CORNER, IndexMask(indices));
|
||||
}
|
||||
|
||||
BLI_NOINLINE static void copy_masked_edges_to_new_mesh(const Mesh &src_mesh,
|
||||
Mesh &dst_mesh,
|
||||
Span<int> edge_map)
|
||||
static void copy_masked_edges_to_new_mesh(const Mesh &src_mesh, Mesh &dst_mesh, Span<int> edge_map)
|
||||
{
|
||||
BLI_assert(src_mesh.totedge == edge_map.size());
|
||||
const Span<MEdge> src_edges = src_mesh.edges();
|
||||
|
@ -177,7 +172,7 @@ BLI_NOINLINE static void copy_masked_edges_to_new_mesh(const Mesh &src_mesh,
|
|||
});
|
||||
}
|
||||
|
||||
BLI_NOINLINE static void copy_masked_edges_to_new_mesh(const Mesh &src_mesh,
|
||||
static void copy_masked_edges_to_new_mesh(const Mesh &src_mesh,
|
||||
Mesh &dst_mesh,
|
||||
Span<int> vertex_map,
|
||||
Span<int> edge_map)
|
||||
|
@ -204,7 +199,7 @@ BLI_NOINLINE static void copy_masked_edges_to_new_mesh(const Mesh &src_mesh,
|
|||
}
|
||||
|
||||
/* Faces and edges changed but vertices are the same. */
|
||||
BLI_NOINLINE static void copy_masked_polys_to_new_mesh(const Mesh &src_mesh,
|
||||
static void copy_masked_polys_to_new_mesh(const Mesh &src_mesh,
|
||||
Mesh &dst_mesh,
|
||||
Span<int> edge_map,
|
||||
Span<int> masked_poly_indices,
|
||||
|
@ -238,7 +233,7 @@ BLI_NOINLINE static void copy_masked_polys_to_new_mesh(const Mesh &src_mesh,
|
|||
}
|
||||
|
||||
/* Only faces changed. */
|
||||
BLI_NOINLINE static void copy_masked_polys_to_new_mesh(const Mesh &src_mesh,
|
||||
static void copy_masked_polys_to_new_mesh(const Mesh &src_mesh,
|
||||
Mesh &dst_mesh,
|
||||
Span<int> masked_poly_indices,
|
||||
Span<int> new_loop_starts)
|
||||
|
@ -270,7 +265,7 @@ BLI_NOINLINE static void copy_masked_polys_to_new_mesh(const Mesh &src_mesh,
|
|||
});
|
||||
}
|
||||
|
||||
BLI_NOINLINE static void copy_masked_polys_to_new_mesh(const Mesh &src_mesh,
|
||||
static void copy_masked_polys_to_new_mesh(const Mesh &src_mesh,
|
||||
Mesh &dst_mesh,
|
||||
Span<int> vertex_map,
|
||||
Span<int> edge_map,
|
||||
|
@ -436,8 +431,7 @@ static void compute_selected_edges_from_vertex_selection(const Mesh &mesh,
|
|||
*r_selected_edges_num = selected_edges_num;
|
||||
}
|
||||
|
||||
BLI_NOINLINE static void compute_selected_polys_from_vertex_selection(
|
||||
const Mesh &mesh,
|
||||
static void compute_selected_polys_from_vertex_selection(const Mesh &mesh,
|
||||
const Span<bool> vertex_selection,
|
||||
Vector<int> &r_selected_poly_indices,
|
||||
Vector<int> &r_loop_starts,
|
||||
|
@ -542,8 +536,7 @@ static void compute_selected_edges_from_edge_selection(const Mesh &mesh,
|
|||
* Checks for every polygon if all the edges are in `edge_selection`. If they are, then that
|
||||
* polygon is kept.
|
||||
*/
|
||||
BLI_NOINLINE static void compute_selected_polys_from_edge_selection(
|
||||
const Mesh &mesh,
|
||||
static void compute_selected_polys_from_edge_selection(const Mesh &mesh,
|
||||
const Span<bool> edge_selection,
|
||||
Vector<int> &r_selected_poly_indices,
|
||||
Vector<int> &r_loop_starts,
|
||||
|
@ -583,7 +576,7 @@ BLI_NOINLINE static void compute_selected_polys_from_edge_selection(
|
|||
/**
|
||||
* Checks for every edge and polygon if all its vertices are in `vertex_selection`.
|
||||
*/
|
||||
BLI_NOINLINE static void compute_selected_mesh_data_from_vertex_selection_edge_face(
|
||||
static void compute_selected_mesh_data_from_vertex_selection_edge_face(
|
||||
const Mesh &mesh,
|
||||
const Span<bool> vertex_selection,
|
||||
MutableSpan<int> r_edge_map,
|
||||
|
@ -613,8 +606,7 @@ BLI_NOINLINE static void compute_selected_mesh_data_from_vertex_selection_edge_f
|
|||
* Checks for every vertex if it is in `vertex_selection`. The polygons and edges are kept if all
|
||||
* vertices of that polygon or edge are in the selection.
|
||||
*/
|
||||
BLI_NOINLINE static void compute_selected_mesh_data_from_vertex_selection(
|
||||
const Mesh &mesh,
|
||||
static void compute_selected_mesh_data_from_vertex_selection(const Mesh &mesh,
|
||||
const Span<bool> vertex_selection,
|
||||
MutableSpan<int> r_vertex_map,
|
||||
MutableSpan<int> r_edge_map,
|
||||
|
@ -649,7 +641,7 @@ BLI_NOINLINE static void compute_selected_mesh_data_from_vertex_selection(
|
|||
* Checks for every edge if it is in `edge_selection`. The polygons are kept if all edges are in
|
||||
* the selection.
|
||||
*/
|
||||
BLI_NOINLINE static void compute_selected_mesh_data_from_edge_selection_edge_face(
|
||||
static void compute_selected_mesh_data_from_edge_selection_edge_face(
|
||||
const Mesh &mesh,
|
||||
const Span<bool> edge_selection,
|
||||
MutableSpan<int> r_edge_map,
|
||||
|
@ -679,8 +671,7 @@ BLI_NOINLINE static void compute_selected_mesh_data_from_edge_selection_edge_fac
|
|||
* Checks for every edge if it is in `edge_selection`. If it is, the vertices belonging to
|
||||
* that edge are kept as well. The polys are kept if all edges are in the selection.
|
||||
*/
|
||||
BLI_NOINLINE static void compute_selected_mesh_data_from_edge_selection(
|
||||
const Mesh &mesh,
|
||||
static void compute_selected_mesh_data_from_edge_selection(const Mesh &mesh,
|
||||
const Span<bool> edge_selection,
|
||||
MutableSpan<int> r_vertex_map,
|
||||
MutableSpan<int> r_edge_map,
|
||||
|
@ -715,8 +706,7 @@ BLI_NOINLINE static void compute_selected_mesh_data_from_edge_selection(
|
|||
/**
|
||||
* Checks for every polygon if it is in `poly_selection`.
|
||||
*/
|
||||
BLI_NOINLINE static void compute_selected_polys_from_poly_selection(
|
||||
const Mesh &mesh,
|
||||
static void compute_selected_polys_from_poly_selection(const Mesh &mesh,
|
||||
const Span<bool> poly_selection,
|
||||
Vector<int> &r_selected_poly_indices,
|
||||
Vector<int> &r_loop_starts,
|
||||
|
@ -746,7 +736,7 @@ BLI_NOINLINE static void compute_selected_polys_from_poly_selection(
|
|||
* Checks for every polygon if it is in `poly_selection`. If it is, the edges
|
||||
* belonging to that polygon are kept as well.
|
||||
*/
|
||||
BLI_NOINLINE static void compute_selected_mesh_data_from_poly_selection_edge_face(
|
||||
static void compute_selected_mesh_data_from_poly_selection_edge_face(
|
||||
const Mesh &mesh,
|
||||
const Span<bool> poly_selection,
|
||||
MutableSpan<int> r_edge_map,
|
||||
|
@ -796,8 +786,7 @@ BLI_NOINLINE static void compute_selected_mesh_data_from_poly_selection_edge_fac
|
|||
* Checks for every polygon if it is in `poly_selection`. If it is, the edges and vertices
|
||||
* belonging to that polygon are kept as well.
|
||||
*/
|
||||
BLI_NOINLINE static void compute_selected_mesh_data_from_poly_selection(
|
||||
const Mesh &mesh,
|
||||
static void compute_selected_mesh_data_from_poly_selection(const Mesh &mesh,
|
||||
const Span<bool> poly_selection,
|
||||
MutableSpan<int> r_vertex_map,
|
||||
MutableSpan<int> r_edge_map,
|
||||
|
|
Loading…
Reference in New Issue