Cleanup: BLI: Parallel Transform #114373

Closed
Iliya Katushenock wants to merge 2 commits from mod_moder:parallel_transform into main

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

Parallel transform is the new function. Analog of std transform with parallelism.
This will simplify common loops over all values.

Parallel transform is the new function. Analog of std transform with parallelism. This will simplify common loops over all values.
Iliya Katushenock added 1 commit 2023-11-01 19:50:23 +01:00
Iliya Katushenock requested review from Hans Goudey 2023-11-01 19:58:13 +01:00
Hans Goudey requested review from Jacques Lucke 2023-11-01 20:05:10 +01:00
Iliya Katushenock added 1 commit 2023-11-01 20:19:30 +01:00
buildbot/vexp-code-patch-coordinator Build done. Details
2663466fb8
progress
Hans Goudey requested changes 2023-11-01 20:27:40 +01:00
@ -290,3 +289,1 @@
dst[i] = math::transform_point(transform, src[i]);
}
});
array_utils::copy(src, dst);
Member

I don't think this change is for the better. Copying and transforming should be the same hot loop.

Same with anywhere else a transform and copy is split in this PR.

I don't think this change is for the better. Copying and transforming should be the same hot loop. Same with anywhere else a transform and copy is split in this PR.
@ -124,6 +119,7 @@ static void transform_greasepencil(GreasePencil &grease_pencil, const float4x4 &
static void translate_instances(bke::Instances &instances, const float3 translation)
{
MutableSpan<float4x4> transforms = instances.transforms();
Member

Unrelated formatting change

Unrelated formatting change
Member

@blender-bot build

@blender-bot build
Jacques Lucke reviewed 2023-11-02 13:20:48 +01:00
Jacques Lucke left a comment
Member

Generally seems ok, my main concerns are:

  • The hot loop is less visible.
  • Manually optimizing the hot loop is less possible.
  • This encourages making hot loops smaller than they should be (e.g. the change in stl_import_mesh.cc).
  • Might result in more copying because data is not explicitly changed inplace.
Generally seems ok, my main concerns are: * The hot loop is less visible. * Manually optimizing the hot loop is less possible. * This encourages making hot loops smaller than they should be (e.g. the change in `stl_import_mesh.cc`). * Might result in more copying because data is not explicitly changed inplace.
Member

Given those points and how this change ended up with extra copying loops, I'd suggest to skip this for now.

Given those points and how this change ended up with extra copying loops, I'd suggest to skip this for now.
Iliya Katushenock added this to the Core Libraries project 2023-12-01 15:04:45 +01:00
Iliya Katushenock deleted branch parallel_transform 2024-04-07 16:28:45 +02:00
Some checks failed
buildbot/vexp-code-patch-coordinator Build done.

Pull request closed

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
3 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#114373
No description provided.