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

More specific type hierarchy for volatile types #332

Open
bogovicj opened this issue Jun 15, 2023 · 0 comments
Open

More specific type hierarchy for volatile types #332

bogovicj opened this issue Jun 15, 2023 · 0 comments

Comments

@bogovicj
Copy link
Contributor

Currently, VolatileIntType extends AbstractVolatileNativeRealType, and is therefore a RealType.
It is not currently an IntegerType, and probably should be.

The same is true for other Volatile types:

  • VolatileByteType
  • VolatileUnsignedByteType
  • VolatileShortType
  • VolatileLongType
  • VolatileUnsignedLongType
  • VolatileARGBType

Adding AbstractVolatileNativeIntegerType and having the appropriate volatile types extend that would be a good step, and would be similar to the type hierarchy for non-volatile types (see AbstractIntegerType for example).

Some specific motivation

This issue came up in n5-viewer
saalfeldlab/n5-viewer#34

one fix to that issue is with this PR in imglib2-ij
imglib/imglib2-ij#35

but this is the deeper issue. Some, maybe all of the changes in the above PR would not be necessary if the type hierarchy for volatile types were more fine-grained. e.g., if volatile types implemented IntegerType, the explicit checks using volatile types in the PR would not be necessary, because there is currently a check for IntegerType.

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

1 participant