Cleanup: Use contiguous storage for delaunay triangulation arrays #111061

Open
Hans Goudey wants to merge 28 commits from HooglyBoogly/blender:delaunay-triangulate-array-format into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Member

Instead of using Array<Vector<T>>, use an array of offsets describing
groups in a contiguous Array<T>. This reduces memory usage by removing
the overhead of storing a Vector per element. Using contiguous memory
also gives benefits with cache locality. Recently mesh face vertices, mesh
topology maps, and curve points have been changed to use this method,
so we have existing abstractions like OffsetIndices and GroupedSpan
that make the pattern more intuitive.

The goal is to allow using more standard attribute interpolation code
for attribute interpolation in the curve fill node. Performance in the
boolean node might be slightly better too, but the bottleneck is likely
elsewhere and I didn't do performance tests there.

Instead of using `Array<Vector<T>>`, use an array of offsets describing groups in a contiguous `Array<T>`. This reduces memory usage by removing the overhead of storing a Vector per element. Using contiguous memory also gives benefits with cache locality. Recently mesh face vertices, mesh topology maps, and curve points have been changed to use this method, so we have existing abstractions like `OffsetIndices` and `GroupedSpan` that make the pattern more intuitive. The goal is to allow using more standard attribute interpolation code for attribute interpolation in the curve fill node. Performance in the boolean node might be slightly better too, but the bottleneck is likely elsewhere and I didn't do performance tests there.
Hans Goudey added 1 commit 2023-08-12 04:36:32 +02:00
d46607b81f Cleanup: Use contiguous storage for delaunay triangulation arrays
Instead of using `Array<Vector<T>>`, use an array of offsets describing
groups in a contiguous `Array<T>`. This reduces memory usage by removing
the overhead of storing a Vector per element. Using contiguous memory
also gives benefits with cache locality. Recently mesh face vertices and
curve points have been changed to use this method, so we have existing
abstractions like `OffsetIndices` and `GroupedSpan` that make the
pattern more intuitive.

The goal is to allow using more standard attribute interpolation code
for attribute interpolation in the curve fill node. Performance in the
boolean node might be slightly better too, but the bottleneck is likely
elsewhere and I didn't do performance tests there.
Hans Goudey added 3 commits 2023-08-20 18:09:29 +02:00
Author
Member

@blender-bot build

@blender-bot build
Hans Goudey added 6 commits 2023-09-14 02:12:25 +02:00
Hans Goudey added 2 commits 2023-09-18 19:35:14 +02:00
Hans Goudey added 1 commit 2023-09-18 19:42:33 +02:00
Hans Goudey added 1 commit 2023-09-18 20:46:38 +02:00
Hans Goudey added 1 commit 2023-10-06 09:58:30 +02:00
Hans Goudey added 1 commit 2023-10-20 09:51:33 +02:00
Hans Goudey added 1 commit 2023-11-15 16:38:07 +01:00
Hans Goudey added 1 commit 2023-11-15 16:45:06 +01:00
Hans Goudey added 1 commit 2023-11-28 01:04:15 +01:00
Hans Goudey added 1 commit 2023-11-28 01:30:47 +01:00
Hans Goudey added 1 commit 2023-12-14 15:55:50 +01:00
Hans Goudey added 7 commits 2023-12-14 19:51:51 +01:00
This pull request has changes conflicting with the target branch.
  • source/blender/blenlib/BLI_delaunay_2d.hh
  • source/blender/blenlib/intern/mesh_intersect.cc
  • source/blender/blenlib/tests/BLI_delaunay_2d_test.cc
  • source/blender/io/wavefront_obj/importer/importer_mesh_utils.cc

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u delaunay-triangulate-array-format:HooglyBoogly-delaunay-triangulate-array-format
git checkout HooglyBoogly-delaunay-triangulate-array-format
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#111061
No description provided.