Package Exports
- gpu-mock.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gpu-mock.js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
gpu-mock.js
A simple mocker for testing threaded development
GPU testing
GPU testing should be easy, but it isn't... ur, uh, wasen't. This lib aims to resolve that. By testing with simple javascript that is transpiled to GPU code, we can have the best of both worlds. A mature debugging environment (javascript), and an accelerated environment (glsl).
Install
npm i gpu-mock.js --saveDev
Use
import gpuMock from 'gpu-mock.js'
const testKernel = gpuMock(myKernelFunction, gpuJsOptions);
const results = testKernel();Why
gpu.js does a lot under the hood that makes debugging challenging. gpu-mock.js provides a pure and simple javascript environment for testing the functions that are planned to be used with gpu.js.