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

Function argumentTypesTest

test/internal/kernel.js:10–24  ·  view source on GitHub ↗

* * @param {Kernel} Kernel

(Kernel)

Source from the content-addressed store, hash-verified

8 * @param {Kernel} Kernel
9 */
10function argumentTypesTest(Kernel) {
11 const kernel = new Kernel(`function(value) { return value[this.thread.x]; }`, {
12 output: [1],
13 functionBuilder: {
14 addKernel: function() {},
15 addFunctions: function() {},
16 getPrototypes: function() { return []; },
17 addNativeFunctions: function() {}
18 },
19 });
20 kernel.build([1]);
21 assert.equal(kernel.argumentTypes.length, 1);
22 assert.equal(kernel.argumentTypes[0], 'Array');
23 kernel.destroy();
24}
25
26test('CPUKernel argumentTypes', () => {
27 argumentTypesTest(CPUKernel);

Callers 1

kernel.jsFile · 0.85

Calls 2

buildMethod · 0.95
destroyMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…