MCPcopy Index your code
hub / github.com/gpujs/gpu.js / outputGraphicalArray

Function outputGraphicalArray

test/features/output.js:153–172  ·  view source on GitHub ↗
(mode)

Source from the content-addressed store, hash-verified

151});
152
153function outputGraphicalArray(mode) {
154 const gpu = new GPU({ mode });
155 const mockContext = {
156 getExtension: () => {}
157 };
158 const mockCanvas = {
159 getContext: () => mockContext,
160 };
161 assert.throws(() => {
162 const kernel = gpu.createKernel(function(input) {
163 return input[this.thread.x];
164 }, {
165 canvas: mockCanvas,
166 output: [5],
167 graphical: true
168 });
169 kernel([1]);
170 }, new Error('Output must have 2 dimensions on graphical mode'));
171 gpu.destroy();
172}
173
174test('graphical output array auto', () => {
175 outputGraphicalArray();

Callers 1

output.jsFile · 0.85

Calls 3

createKernelMethod · 0.95
destroyMethod · 0.95
kernelFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…