Conversation
Contributor
There was a problem hiding this comment.
Cpp-linter Review
Used clang-format v18.1.3
Click here for the full clang-format patch
diff --git a/sysrap/SRecord.h b/sysrap/SRecord.h
index 782be77..9f8eab5 100644
--- a/sysrap/SRecord.h
+++ b/sysrap/SRecord.h
@@ -396 +396 @@ inline bool SRecord::FindInterpolatedPhotonFromRecordAtTime( sphoton& p, const s
- p.pos = sysrap::lerp( p0.pos, p1.pos, frac ) ; // interpolated position
+ p.pos = sysrap::lerp(p0.pos, p1.pos, frac); // interpolated position
diff --git a/sysrap/scuda.h b/sysrap/scuda.h
index 5d21556..6e2bc5f 100644
--- a/sysrap/scuda.h
+++ b/sysrap/scuda.h
@@ -128 +128,2 @@ SUTIL_INLINE SUTIL_HOSTDEVICE unsigned long long min(unsigned long long a, unsig
-namespace sysrap { // avoid name conflict with std::lerp function
+namespace sysrap
+{ // avoid name conflict with std::lerp function
@@ -146 +147 @@ SUTIL_INLINE SUTIL_HOSTDEVICE float bilerp(const float x00, const float x10, con
-}
+} // namespace sysrap
Have any feedback or feature suggestions? Share it here.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Cpp-linter Review
Used clang-format v18.1.3
Click here for the full clang-format patch
diff --git a/sysrap/SRecord.h b/sysrap/SRecord.h
index 782be77..9f8eab5 100644
--- a/sysrap/SRecord.h
+++ b/sysrap/SRecord.h
@@ -396 +396 @@ inline bool SRecord::FindInterpolatedPhotonFromRecordAtTime( sphoton& p, const s
- p.pos = sysrap::lerp( p0.pos, p1.pos, frac ) ; // interpolated position
+ p.pos = sysrap::lerp(p0.pos, p1.pos, frac); // interpolated position
diff --git a/sysrap/scuda.h b/sysrap/scuda.h
index 3b386ba..6e2bc5f 100644
--- a/sysrap/scuda.h
+++ b/sysrap/scuda.h
@@ -128 +128,2 @@ SUTIL_INLINE SUTIL_HOSTDEVICE unsigned long long min(unsigned long long a, unsig
-namespace sysrap { // avoid name conflict with std::lerp function
+namespace sysrap
+{ // avoid name conflict with std::lerp function
Have any feedback or feature suggestions? Share it here.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request attempts to fix a potential naming conflict between std::lerp (introduced in C++20) and the custom lerp function by wrapping it in a sysrap namespace. However, the implementation is incomplete.
Changes:
- Added a
sysrapnamespace around thefloatversion oflerpandbilerpfunctions insysrap/scuda.h - Updated one call site in
sysrap/SRecord.hto usesysrap::lerpwith the namespace qualifier
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| sysrap/scuda.h | Added sysrap namespace around the float versions of lerp and bilerp (lines 128-146) |
| sysrap/SRecord.h | Updated lerp call to use sysrap:: namespace qualifier |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Cpp-linter Review
Used clang-format v18.1.3
Click here for the full clang-format patch
diff --git a/sysrap/scuda.h b/sysrap/scuda.h
index 4eef533..bee2f67 100644
--- a/sysrap/scuda.h
+++ b/sysrap/scuda.h
@@ -132,8 +132,5 @@ namespace sysrap
-/** lerp */
-SUTIL_INLINE SUTIL_HOSTDEVICE float lerp(const float a, const float b, const float t)
-{
- return a + t*(b-a);
-}
-
-
-
+ /** lerp */
+ SUTIL_INLINE SUTIL_HOSTDEVICE float lerp(const float a, const float b, const float t)
+ {
+ return a + t * (b - a);
+ }
@@ -141,6 +138,6 @@ SUTIL_INLINE SUTIL_HOSTDEVICE float lerp(const float a, const float b, const flo
-/** bilerp */
-SUTIL_INLINE SUTIL_HOSTDEVICE float bilerp(const float x00, const float x10, const float x01, const float x11,
- const float u, const float v)
-{
- return lerp( lerp( x00, x10, u ), lerp( x01, x11, u ), v );
-}
+ /** bilerp */
+ SUTIL_INLINE SUTIL_HOSTDEVICE float bilerp(const float x00, const float x10, const float x01, const float x11,
+ const float u, const float v)
+ {
+ return lerp(lerp(x00, x10, u), lerp(x01, x11, u), v);
+ }
Have any feedback or feature suggestions? Share it here.
plexoos
commented
Feb 13, 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.
Should fix simoncblyth/opticks#9