Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants