| 699 | |
| 700 | public: |
| 701 | Iteration(int32_t id, InferenceOptions const& inference, ContextType& context, Bindings& bindings) |
| 702 | : mBindings(bindings) |
| 703 | , mStreamId(id) |
| 704 | , mDepth(1 + inference.overlap) |
| 705 | , mActive(mDepth) |
| 706 | , mEvents(mDepth) |
| 707 | , mEnqueueTimes(mDepth) |
| 708 | , mContext(&context) |
| 709 | { |
| 710 | for (int32_t d = 0; d < mDepth; ++d) |
| 711 | { |
| 712 | for (int32_t e = 0; e < static_cast<int32_t>(EventType::kNUM); ++e) |
| 713 | { |
| 714 | mEvents[d][e].reset(new TrtCudaEvent(!inference.spin)); |
| 715 | } |
| 716 | } |
| 717 | createEnqueueFunction(inference, context, bindings); |
| 718 | } |
| 719 | |
| 720 | bool query(bool skipTransfers) |
| 721 | { |