(shape: number[])
| 132 | size = true; |
| 133 | |
| 134 | constructor(shape: number[]) { |
| 135 | this.outputShape = shape; |
| 136 | this.dispatchLayout = flatDispatchLayout(this.outputShape); |
| 137 | this.dispatch = computeDispatch( |
| 138 | this.dispatchLayout, this.outputShape, this.workgroupSize); |
| 139 | // |n| Size of the original input of TopK |
| 140 | // |firstPass| indicates if this is the first time swap is being used which |
| 141 | // means no indices input containing the top K is present yet. |
| 142 | // |k| Top k elements desired |
| 143 | this.uniforms = `inputSize : i32, firstPass : i32, k : i32,`; |
| 144 | this.shaderKey = 'merge'; |
| 145 | } |
| 146 | |
| 147 | getUserCode(): string { |
| 148 | const userCode = ` |
nothing calls this directly
no test coverage detected