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

Function functionCompositionFunctionNode

test/internal/function-composition.js:39–55  ·  view source on GitHub ↗
(FunctionNode)

Source from the content-addressed store, hash-verified

37describe('internal: function composition FunctionNode');
38
39function functionCompositionFunctionNode(FunctionNode) {
40 const output = [1];
41 const node = new FunctionNode(`function kernel() {
42 function inner() { return 1; }
43
44 return inner();
45 }`, {
46 output,
47 onNestedFunction: sinon.spy(),
48 lookupReturnType: () => 'Number',
49 lookupFunctionArgumentTypes: () => {}
50 });
51
52 const string = node.toString();
53 assert.equal(node.onNestedFunction.callCount, 1);
54 return string;
55}
56
57test('CPUFunctionNode', () => {
58 assert.equal(functionCompositionFunctionNode(CPUFunctionNode), 'function kernel() {'

Callers 1

Calls 1

toStringMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…