-
Notifications
You must be signed in to change notification settings - Fork 631
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
support runtime choice of precision #1549
Comments
I have started working on this by first going through A more practical alternative is to keep the current compile-time option and just enable single precision by default. All we would then need to do is modify the unit tests so that everything passes. |
Another complication to adding templates are two existing Lines 1318 to 1323 in 2dcfa9f
Lines 1476 to 1479 in 2dcfa9f
The issue here is that a fair amount of code reorganization (not directly related to templating) is required to set this all up. |
I think that any competent C++ programmer should be able to do this — it doesn't require any particular knowledge of how Meep works, and is just a (tedious but straightforward) matter of changing a type in one place and then tracing how that change propagates through the library, which is a common software-engineering task. |
As an alternative, when you build with |
As commented in #1544, it would be good to be able to switch precision at runtime, by making
fields<T>
,fields_chunk<T>
,structure<T>
, andstructure_chunk<T>
template classes parameterized by therealnum
typeT
.The text was updated successfully, but these errors were encountered: