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

Function outputGraphicalCube

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

Source from the content-addressed store, hash-verified

351});
352
353function outputGraphicalCube(mode) {
354 const gpu = new GPU({ mode });
355 const mockContext = {
356 getExtension: () => {}
357 };
358 const mockCanvas = {
359 getContext: () => mockContext
360 };
361 assert.throws(() => {
362 const kernel = gpu.createKernel(function(input) {
363 return input[this.thread.x];
364 }, {
365 canvas: mockCanvas,
366 output: [5,5,5],
367 graphical: true
368 });
369 kernel([1]);
370 }, new Error('Output must have 2 dimensions on graphical mode'));
371 gpu.destroy();
372}
373
374test('graphical output array auto', () => {
375 outputGraphicalCube();

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…