Fix Spatial Wrapped invalid env/radii detection#1182
Merged
Conversation
Member
Author
|
The following appears to work for values tested so far. Not the cheapest method so worth only doing this once on the host and storing if wrapped is available for a given spatial message list on the device, rather than doing this per call to the wrapped iterator on the device template <typename T>
bool approxExactlyDivisible(T a, T b) {
// Scale machine epsilon by the magnitude of the larger value
T scaledEpsilon = std::max(std::abs(a), std::abs(b)) * std::numeric_limits<T>::epsilon();
// Compute the remainder
T v = std::fmod(a, b);
// approx equal if the remainder is within scaledEpsilon of 0 or b (fmod(1, 0.05f) returns ~0.05f)
return v <= scaledEpsilon || v > b - scaledEpsilon;
} |
7 tasks
7751622 to
29eb33d
Compare
29eb33d to
12ad320
Compare
12ad320 to
8395a67
Compare
SEtuptoolls and wheels were removed from the base image for all pythons (not just < 3.12) on 2025-06-22.
6dfb069 to
d0c21b0
Compare
8395a67 to
53e860f
Compare
…ecking Improves checking that the communication radius is a factor of the envionment dimensions when using spaical communication with seatbelts enabled This was preivously not always correct due to floating point use for some common cases, including 1 / 0.05f. This is now checked once on the host, and stored in the messageing MetaData so that if the wrapped communicator is used on device a runtime exception can be raised. A new internal (detail) header is creatd with a function that is common to 2D and 3D implementations. Closes #1177
This reverts commit a5acb13.
53e860f to
360b6d3
Compare
mondus
approved these changes
Sep 2, 2025
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.
0.05Closes #1177