Skip to content

Commit 9f998dd

Browse files
authored
Docs: Add type annotations for dispatch size in ComputeNode (#32068)
1 parent 260d0c4 commit 9f998dd

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/nodes/gpgpu/ComputeNode.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class ComputeNode extends Node {
5454
/**
5555
* TODO
5656
*
57-
* @type {number}
57+
* @type {number|Array<number>}
5858
*/
5959
this.count = null;
6060

@@ -91,6 +91,12 @@ class ComputeNode extends Node {
9191

9292
}
9393

94+
/**
95+
* TODO
96+
*
97+
* @param {number|Array<number>} count - Array with [ x, y, z ] values for dispatch or a single number for the count
98+
* @return {ComputeNode}
99+
*/
94100
setCount( count ) {
95101

96102
this.count = count;
@@ -99,6 +105,11 @@ class ComputeNode extends Node {
99105

100106
}
101107

108+
/**
109+
* TODO
110+
*
111+
* @return {number|Array<number>}
112+
*/
102113
getCount() {
103114

104115
return this.count;
@@ -263,7 +274,7 @@ export const computeKernel = ( node, workgroupSize = [ 64 ] ) => {
263274
* @tsl
264275
* @function
265276
* @param {Node} node - TODO
266-
* @param {number} count - TODO.
277+
* @param {number|Array<number>} count - TODO.
267278
* @param {Array<number>} [workgroupSize=[64]] - TODO.
268279
* @returns {AtomicFunctionNode}
269280
*/

0 commit comments

Comments
 (0)