Skip to content

Visualize float16 datasets - #2045

Open
NAThompson wants to merge 1 commit into
silx-kit:mainfrom
NAThompson:float16-support
Open

Visualize float16 datasets#2045
NAThompson wants to merge 1 commit into
silx-kit:mainfrom
NAThompson:float16-support

Conversation

@NAThompson

Copy link
Copy Markdown

isTypedArray did not recognize Float16Array, so half-precision values were rejected outright even though parseDType already labelled the datasets float16. The check goes through globalThis because naming the constructor directly would throw a ReferenceError on older runtimes.

Heatmaps view the halves as uint16 rather than widening them to float32, so they upload as a HALF_FLOAT texture -- already supported here -- with no conversion pass and half the texture memory.

@NAThompson

Copy link
Copy Markdown
Author

@axelboc : Had to alias to Uint16 until this is resolve.

Also this PR depends on usnistgov/h5wasm#141, so no merge until then.

`isTypedArray` did not recognize `Float16Array`, so half-precision values were
rejected outright even though `parseDType` already labelled the datasets
float16. The check goes through `globalThis` because naming the constructor
directly would throw a `ReferenceError` on older runtimes.

Heatmaps view the halves as uint16 rather than widening them to float32, so
they upload as a HALF_FLOAT texture -- already supported here -- with no
conversion pass and half the texture memory.
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.

1 participant