Bug-fix release: array-returning kernels in dev mode.
Fixed
-
A kernel returning an array produced
NaNundermode: 'dev'(#719). Dev mode delegates to gpu-mock.js, whose mock loops assigned each thread's return value into aFloat32Arrayslot, so arrays coerced toNaN. Fixed upstream in gpu-mock.js 1.4.0; the dependency also moves off the fork it was pinned to in #840 and onto that release.Array returns now match the real backends in one, two and three dimensions, and number returns still come back as a flat
Float32Array. Regression tests cover both, plus parity againstcpumode.
Installing
npm install gpu.js@2.19.4<script src="https://unpkg.com/gpu.js@2.19.4/dist/gpu-browser.min.js"></script>