[REFACTOR] Move source_utils.h into runtime/opencl#19456
Merged
Conversation
`src/runtime/source_utils.h` is only used by OpenCL backend code. Move it into the opencl subdir, inline `SplitKernels` (single short function), and delete the now-empty `.cc`.
Contributor
There was a problem hiding this comment.
Code Review
This pull request moves source_utils.h from the general runtime directory to the OpenCL-specific directory, updates include paths in OpenCL modules, and converts the SplitKernels function into an inline definition. Feedback was provided to optimize the SplitKernels function by passing string parameters by constant reference to prevent redundant memory allocations.
The header-only inline form copies the OpenCL source string on every call; const reference avoids the copy. The function only reads the parameters.
Member
Author
|
Done: changed to |
spectrometerHBH
approved these changes
Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move source_utils.h header into runtime/opencl directory with SplitKernels inlined. Removes the standalone source_utils.cc file and updates 2 include paths to reflect the new location.
Test plan