gpuweb / cts

WebGPU Conformance Test Suite
https://gpuweb.github.io/cts/
BSD 3-Clause "New" or "Revised" License
124 stars 77 forks source link

`F32Vector` and `F32Matrix` could store if they are contain only finite values #2253

Closed zoddicus closed 3 months ago

zoddicus commented 1 year ago

Functions like makeMatrixToMatrixCase need to do filtering based on if any of elements in the result are non-finite. This is currently done by iterating over every element in the container. Checking for finite-ness is done a number of places in the numeric framework, so there is potential for improving this by having something like isFinite on the type, that they can cache the result, instead of calculating it on demand all over the place.

zoddicus commented 1 year ago

This would probably require F32Matrix & F32Vector to be a real class instead of just an alias over arrays and 2D arrays.

zoddicus commented 3 months ago

This would require adding significant code complexity by turning simple containers into classes.