| 445 | } |
| 446 | |
| 447 | void Graph::clear() |
| 448 | { |
| 449 | if (finalized) |
| 450 | throw std::logic_error("graph cannot be cleared after finalization"); |
| 451 | |
| 452 | cleanup(); |
| 453 | ops.clear(); |
| 454 | scratch.reset(); |
| 455 | scratchByteSize = 0; |
| 456 | privateByteSize = 0; |
| 457 | workAmount = 0; |
| 458 | tensorScratchByteOffset = 0; |
| 459 | dirty = false; |
| 460 | } |
| 461 | |
| 462 | void Graph::finalize() |
| 463 | { |
no test coverage detected