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

Constant traits not working for integer types #226

Open
Speierers opened this issue May 21, 2024 · 2 comments
Open

Constant traits not working for integer types #226

Speierers opened this issue May 21, 2024 · 2 comments

Comments

@Speierers
Copy link
Member

The constant traits in const.py and array_constants.h do not handle integer types properly as they assume floating-point types.

For the traits specific to floats (e.g. dr::Pi, dr::Epsilon) we should probably add a static assert, and other traits (e.g. dr::Smallest, dr::Largest, ...) should be fixed.

If I find the time, I will try to open a PR to fix those issues.

@merlinND
Copy link
Member

Hi @Speierers,

Just in case you're referring to the non-nanobind version, before opening a PR, check out the upcoming version, which I believe is implemented differently (don't know how it handles integer types though): https://github.com/mitsuba-renderer/drjit/blob/nanobind_v2/include/drjit/array_constants.h

@Speierers
Copy link
Member Author

Good point @merlinND 👍 although I think the issue is still there in the nanobind version.

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