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

Initial support for HalfGrid and ComputeType #1787

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ghurstunither
Copy link
Contributor

Initial support for HalfGrid and ComputeType in OpenVDB, where the latter enables intermediate float computations for HalfGrid to increase accuracy and speed.

  • Uses ValueToComputeMap in Types.h to set ComputeType at the leaf level and then to propagate all the way up to the grid level.
    • For math::half, ComputeType is float and for any other type T, ComputeType is T.
  • Defines and registers HalfGrid (half vectors not in this PR).
  • Moved the inclusion/declaration of math::half from Types.h to its own HalfDecl.h
    • Added some arithmetic support for math::half in Math.h (to avoid casting in some places) so there were now circular dependancies.
  • Refactors many tools and utilities to perform intermediate computations with ComputeType instead of ValueType.

Note, I decided not to define openvdb::is_floating_point and friends. Instead I opted to use std::is_floating_point<ComputeType>()::value instead.


Still to come in this PR

*Uunit tests for half and to verify no unit tests have broken.

  • Quantification of the level of support in tools.
    • e.g. some tools didn't need refactoring, and so this PR doesn't reflect that they fully support half grids
  • More examples within this description.

Initial support for HalfGrid and ComputeType, where the latter enables float computations for HalfGrid which increases accuracy and speed.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
Remove HalfGrid from RealGridTypes until a consensus is reached.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
Fixes trailingspaces errors

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

None yet

1 participant