Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL_INF value could be updated #329

Open
ariostas opened this issue Oct 2, 2023 · 1 comment
Open

SDL_INF value could be updated #329

ariostas opened this issue Oct 2, 2023 · 1 comment

Comments

@ariostas
Copy link
Member

ariostas commented Oct 2, 2023

Currently SDL_INF is used to deal with cases where there are infinities. It is defined as follows.

TrackLooper/SDL/Constants.h

Lines 152 to 153 in f1b2031

// Since C++ can't represent infinity, SDL_INF = 123456789 was used to represent infinity in the data table
ALPAKA_STATIC_ACC_MEM_GLOBAL const float SDL_INF = 123456789;

I think it would be a little more elegant to define it like this

#include <limits>
ALPAKA_STATIC_ACC_MEM_GLOBAL const float SDL_INF = std::numeric_limits<float>::infinity();

But the tricky part is that data files have the other value hardcoded, and those files were probably generated by some other code with the same value hardcoded, so it's probably not worth it fixing it here. If someone knows if that's the case they should label this issue as wontfix.

@GNiendorf
Copy link
Member

If you want to take a stab at this, the SDL_INF constant in LSTGeometry is now stored here: https://github.com/SegmentLinking/LSTGeometry/blob/master/Constants.py

I plan to make a PR moving to a binary file format sometime in the near future though, so we have to keep that in mind.

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

No branches or pull requests

2 participants