(start: () => void, end: () => void, f: () => T)
| 475 | } |
| 476 | |
| 477 | private scopedRun<T>(start: () => void, end: () => void, f: () => T): T { |
| 478 | start(); |
| 479 | try { |
| 480 | const res = f(); |
| 481 | end(); |
| 482 | return res; |
| 483 | } catch (ex) { |
| 484 | end(); |
| 485 | throw ex; |
| 486 | } |
| 487 | } |
| 488 | |
| 489 | private static nextTensorId = 0; |
| 490 | private nextTensorId(): number { |
no test coverage detected