https://github.com/gpujs/gpu-mock.js
A simple mocker for testing threaded development
https://github.com/gpujs/gpu-mock.js
Last synced: 6 months ago
JSON representation
A simple mocker for testing threaded development
- Host: GitHub
- URL: https://github.com/gpujs/gpu-mock.js
- Owner: gpujs
- License: mit
- Created: 2017-09-07T19:58:36.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-09-21T16:59:11.000Z (over 5 years ago)
- Last Synced: 2025-05-24T19:44:23.281Z (8 months ago)
- Language: JavaScript
- Size: 15.6 KB
- Stars: 4
- Watchers: 5
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gpu-mock.js
A simple mocker for testing threaded development.
## GPU testing
GPU testing should be easy, but it isn't... ur, uh, wasn'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
```js
import { gpuMock } from 'gpu-mock.js'
const testKernel = gpuMock(myKernelFunction, gpuJsOptions);
const results = testKernel();
```
## Why
**gpu.js**, and further the GPU, do a lot under the hood that can make 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**.