For the purpose of control flow, every tensor produced by TensorFlow is conceptually tagged by a 'FrameAndIter'. FrameAndIter consists of a 'frame_id' and an 'iter_id'. The tensor value it represents is produced in the frame with frame_id at the iteration of iter_id.
| 30 | // 'frame_id' and an 'iter_id'. The tensor value it represents is produced |
| 31 | // in the frame with frame_id at the iteration of iter_id. |
| 32 | struct FrameAndIter { |
| 33 | uint64 frame_id = kIllegalFrameId; |
| 34 | int64 iter_id = kIllegalIterId; |
| 35 | |
| 36 | FrameAndIter() {} |
| 37 | |
| 38 | FrameAndIter(uint64 frame, int64 iter) { |
| 39 | frame_id = frame; |
| 40 | iter_id = iter; |
| 41 | } |
| 42 | |
| 43 | bool operator==(const FrameAndIter& other) const { |
| 44 | return (frame_id == other.frame_id && iter_id == other.iter_id); |
| 45 | } |
| 46 | }; |
| 47 | |
| 48 | struct FrameAndIterHash { |
| 49 | size_t operator()(const FrameAndIter& key) const { |
no outgoing calls