(locs: number[])
| 118 | } |
| 119 | |
| 120 | locToIndex(locs: number[]): number { |
| 121 | if (this.rank === 0) { |
| 122 | return 0; |
| 123 | } else if (this.rank === 1) { |
| 124 | return locs[0]; |
| 125 | } |
| 126 | let index = locs[locs.length - 1]; |
| 127 | for (let i = 0; i < locs.length - 1; ++i) { |
| 128 | index += this.strides[i] * locs[i]; |
| 129 | } |
| 130 | return index; |
| 131 | } |
| 132 | |
| 133 | indexToLoc(index: number): number[] { |
| 134 | if (this.rank === 0) { |
no outgoing calls
no test coverage detected