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

Function testDirectlyOnKernelViaSettings

test/features/add-custom-native-function.js:286–296  ·  view source on GitHub ↗
(nativeFunctions, mode)

Source from the content-addressed store, hash-verified

284describe('features: Adding nativeFunctions directly on kernel');
285
286function testDirectlyOnKernelViaSettings(nativeFunctions, mode) {
287 const gpu = new GPU({ mode });
288 const kernel = gpu.createKernel(function (v) {
289 return native(v[this.thread.x]);
290 }, {
291 output: [1],
292 nativeFunctions
293 });
294 assert.equal(kernel([1])[0], 2);
295 gpu.destroy();
296}
297
298test('via settings auto', () => {
299 testDirectlyOnKernelViaSettings([

Callers 1

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…