Skip to content

BUILD_WITH_NEON flag added in cmake config and in code - #14816

Merged
remibettan merged 11 commits into
realsenseai:developmentfrom
remibettan:adding-cmake-flag-for-neon
Mar 22, 2026
Merged

remibettan merged 11 commits into
realsenseai:developmentfrom
remibettan:adding-cmake-flag-for-neon

Conversation

@remibettan

Copy link
Copy Markdown
Contributor

Tracked by: RSDEV-6251

Copilot AI review requested due to automatic review settings March 16, 2026 09:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a build-time toggle to control whether ARM NEON-optimized processing paths are compiled/selected, aligning the CMake configuration with compile-time guards in the processing code.

Changes:

  • Introduces BUILD_WITH_NEON CMake option and propagates it into C/C++ via -DBUILD_WITH_NEON.
  • Gates NEON-optimized implementations (align, pointcloud, YUY2 unpacking) behind defined(BUILD_WITH_NEON) in addition to __ARM_NEON.
  • Updates Unix ARM (32-bit) compiler flags to only apply -mfpu=neon when BUILD_WITH_NEON is enabled.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/proc/pointcloud.cpp Only selects NEON pointcloud implementation when BUILD_WITH_NEON is enabled.
src/proc/neon/neon-pointcloud.h Guards NEON pointcloud class declaration behind BUILD_WITH_NEON.
src/proc/neon/neon-pointcloud.cpp Guards NEON pointcloud implementation behind BUILD_WITH_NEON.
src/proc/neon/neon-align.h Guards NEON align helper/classes behind BUILD_WITH_NEON.
src/proc/neon/neon-align.cpp Guards NEON align implementation behind BUILD_WITH_NEON.
src/proc/neon/image-neon.h Guards NEON YUY2 unpack prototypes behind BUILD_WITH_NEON.
src/proc/neon/image-neon.cpp Guards NEON YUY2 unpack implementation behind BUILD_WITH_NEON.
src/proc/color-formats-converter.cpp Only uses NEON unpack path when BUILD_WITH_NEON is enabled.
src/proc/align.cpp Only selects NEON align implementation when BUILD_WITH_NEON is enabled.
CMake/unix_config.cmake Applies ARM NEON-related compile flags conditionally based on BUILD_WITH_NEON.
CMake/lrs_options.cmake Adds BUILD_WITH_NEON option (default ON).
CMake/global_config.cmake Defines BUILD_WITH_NEON compile macro when the option is enabled.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CMake/unix_config.cmake Resolved
Comment thread CMake/lrs_options.cmake Resolved
Comment thread CMake/unix_config.cmake Resolved
@remibettan
remibettan requested a review from Nir-Az March 16, 2026 13:31
@remibettan
remibettan force-pushed the adding-cmake-flag-for-neon branch from f3359f5 to dd09c88 Compare March 17, 2026 09:17
Comment thread CMake/global_config.cmake Resolved
Comment thread CMake/global_config.cmake Resolved

@Nir-Az Nir-Az left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved just add the message

Comment thread CMake/lrs_options.cmake Resolved
Comment thread CMake/unix_config.cmake Resolved
@Nir-Az Nir-Az changed the title flag added in cmake config and in code BUILD_WITH_NEON flag added in cmake config and in code Mar 19, 2026
Comment thread CMake/lrs_options.cmake Resolved
@remibettan
remibettan force-pushed the adding-cmake-flag-for-neon branch from 93c4d5c to d34e184 Compare March 19, 2026 14:20
@remibettan
remibettan merged commit 09fe916 into realsenseai:development Mar 22, 2026
27 checks passed
@remibettan
remibettan deleted the adding-cmake-flag-for-neon branch July 8, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants