18 for (const IndexRange curves_range : curve_ranges.slice(ranges_range)) {
19 threading::parallel_for(curves_range, 4096, [&](IndexRange range) {
20 for (const int i : range) {
21 counts[i] = curves.points_for_curve(i).size();
32 const int count = counts_to_offsets[i];
34 counts_to_offsets[i] =
offset;
47 for (const IndexRange range : curve_ranges.slice(range)) {
48 const IndexRange src_points = src_curves.points_for_curves(range);
49 const IndexRange dst_points = dst_curves.points_for_curves(range);
51 dst.slice(dst_points).copy_from(src.slice(src_points));
63 for (const int i : src_curve_selection.slice(range)) {
64 const IndexRange src_points = src_curves.points_for_curve(i);
65 const IndexRange dst_points = dst_curves.points_for_curve(i);
67 dst.slice(dst_points).copy_from(src.slice(src_points));
80 for (const int i : curve_selection.slice(range)) {
81 const IndexRange points = curves.points_for_curve(i);
82 type.fill_assign_n(value.get(), dst.slice(curves.points_for_curve(i)).data(), points.size());
100 const std::array<int, CURVE_TYPES_NUM> &type_counts,
108 if (
types.is_single()) {
113 selection, 4096, r_indices, [&](
const int index) {
return types_span[index] ==
type; });
117 const std::array<int, CURVE_TYPES_NUM> &counts,
128 if (!
mask.is_empty()) {
Low-level operations for curves.
void CustomData_copy(const struct CustomData *source, struct CustomData *dest, eCustomDataMask mask, eCDAllocType alloctype, int totelem)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to curves
const CPPType & type() const
const CPPType * type() const
IndexRange index_range() const
constexpr IndexRange drop_back(int64_t n) const
constexpr T & last(const int64_t n=0) const
constexpr IndexRange index_range() const
constexpr IndexRange index_range() const
SyclQueue void void * src
SyclQueue void void size_t num_bytes void
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
ccl_gpu_kernel_postfix int ccl_global int * indices
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
void fill_curve_counts(const bke::CurvesGeometry &curves, Span< IndexRange > curve_ranges, MutableSpan< int > counts)
IndexMask indices_for_type(const VArray< int8_t > &types, const std::array< int, CURVE_TYPES_NUM > &type_counts, const CurveType type, const IndexMask selection, Vector< int64_t > &r_indices)
void accumulate_counts_to_offsets(MutableSpan< int > counts_to_offsets, int start_offset=0)
bke::CurvesGeometry copy_only_curve_domain(const bke::CurvesGeometry &src_curves)
void fill_points(const CurvesGeometry &curves, IndexMask curve_selection, GPointer value, GMutableSpan dst)
void copy_point_data(const CurvesGeometry &src_curves, const CurvesGeometry &dst_curves, Span< IndexRange > curve_ranges, GSpan src, GMutableSpan dst)
void foreach_curve_by_type(const VArray< int8_t > &types, const std::array< int, CURVE_TYPES_NUM > &type_counts, IndexMask selection, FunctionRef< void(IndexMask)> catmull_rom_fn, FunctionRef< void(IndexMask)> poly_fn, FunctionRef< void(IndexMask)> bezier_fn, FunctionRef< void(IndexMask)> nurbs_fn)
IndexMask find_indices_based_on_predicate(const IndexMask indices_to_check, const int64_t parallel_grain_size, Vector< int64_t > &r_indices, const Predicate &predicate)
void parallel_for(IndexRange range, int64_t grain_size, const Function &function)
CurvesGeometryRuntimeHandle * runtime