| 318 | } |
| 319 | |
| 320 | void LoopImpl::DescImplBase::CounterProvider::init_output_static_infer_desc() { |
| 321 | using namespace cg::static_infer; |
| 322 | |
| 323 | auto&& mgr = owner_graph()->static_infer_manager(); |
| 324 | mgr.register_shape_infer(output(0), ShapeInferDesc::make_const({1})); |
| 325 | |
| 326 | auto infer_value = [this](DeviceTensorND& dest, const InpVal&) { |
| 327 | dest.resize({1}).ptr<int>()[0] = m_next_val; |
| 328 | return true; |
| 329 | }; |
| 330 | mgr.register_value_infer(output(0), {SourceType::MUTABLE, {}, infer_value}); |
| 331 | } |
| 332 | |
| 333 | void LoopImpl::DescImplBase::CounterProvider::update_next_val() { |
| 334 | m_next_val += m_delta; |
nothing calls this directly
no test coverage detected