(
shape: [number]|[number, number], hasWeights: boolean,
binaryOutput = false)
| 45 | rank: number; |
| 46 | |
| 47 | constructor( |
| 48 | shape: [number]|[number, number], hasWeights: boolean, |
| 49 | binaryOutput = false) { |
| 50 | this.outputShape = shape; |
| 51 | this.rank = shape.length; |
| 52 | this.dispatchLayout = flatDispatchLayout(this.outputShape); |
| 53 | this.dispatch = computeDispatch( |
| 54 | this.dispatchLayout, this.outputShape, this.workgroupSize); |
| 55 | |
| 56 | this.binaryOutput = binaryOutput; |
| 57 | if (binaryOutput) { |
| 58 | this.atomic = false; |
| 59 | } |
| 60 | this.hasWeights = hasWeights; |
| 61 | if (this.hasWeights) { |
| 62 | this.variableNames.push('w'); |
| 63 | } |
| 64 | this.shaderKey = |
| 65 | `bincount_${this.hasWeights}_${this.binaryOutput}_${this.rank}`; |
| 66 | } |
| 67 | |
| 68 | getUserCode(): string { |
| 69 | const userCode = ` |
nothing calls this directly
no test coverage detected