Lines Matching refs:std

89 typedef std::pair<uint32_t, uint32_t> SourceOperandIndex;
105 std::vector<const ModelBuilder*> mModels;
111 typedef std::vector<std::pair<uint32_t, uint32_t>> RemapVectorType;
112 typedef std::set<std::pair<uint32_t, uint32_t>> StepModelOutputSetType;
117 std::shared_ptr<Device> device);
130 const std::vector<uint32_t>& getInputIndexStepModelToMainModel() const { in getInputIndexStepModelToMainModel()
133 const std::vector<uint32_t>& getOutputIndexStepModelToMainModel() const { in getOutputIndexStepModelToMainModel()
136 const std::vector<uint32_t>& getOutputsAsStepModelInputsIndexToMainModel() const { in getOutputsAsStepModelInputsIndexToMainModel()
151 std::shared_ptr<Device> getDevice() const { return mDevice; } in getDevice()
154 std::shared_ptr<PreparedModel> getPreparedStepModel() const { return mPreparedStepModel; } in getPreparedStepModel()
161 std::shared_ptr<StepExecutor> stepExecutor, const Memory* temporaryMemory,
162 const std::map<SourceOperandIndex, uint32_t>& sourceOperandToOffsetOfTemporary,
163 const std::map<SourceOperandIndex, uint32_t>& sourceOperandToInputIndex,
164 const std::map<SourceOperandIndex, uint32_t>& sourceOperandToOutputIndex,
165 const std::map<SourceOperandIndex, ConstantReferenceLocation>&
185 std::shared_ptr<Device> mDevice;
186 std::shared_ptr<PreparedModel> mPreparedStepModel;
224 std::unordered_map<uint32_t, uint32_t> mOperandMap;
229 std::vector<uint32_t> mInputIndexStepModelToMainModel;
235 std::vector<uint32_t> mOutputIndexStepModelToMainModel;
248 std::vector<uint32_t> mOutputsAsStepModelInputsIndexToMainModel;
275 std::vector<SourceOperandIndex> outerInputOperands;
277 std::vector<SourceOperandIndex> outerOutputOperands;
279 std::vector<SourceOperandIndex> thenBranchInputOperands;
281 std::vector<SourceOperandIndex> thenBranchOutputOperands;
283 std::vector<SourceOperandIndex> elseBranchInputOperands;
285 std::vector<SourceOperandIndex> elseBranchOutputOperands;
312 std::vector<SourceOperandIndex> outerInputOperands;
314 std::vector<SourceOperandIndex> outerOutputOperands;
316 std::vector<SourceOperandIndex> condInputOperands;
321 std::vector<SourceOperandIndex> bodyInputOperands;
323 std::vector<SourceOperandIndex> bodyOutputOperands;
347 explicit LogicalStep(Args&&... args) : mStep(std::forward<Args>(args)...) {} in LogicalStep()
349 bool isExecution() const { return std::holds_alternative<ExecutionStep>(mStep); } in isExecution()
350 bool isIf() const { return std::holds_alternative<IfStep>(mStep); } in isIf()
351 bool isWhile() const { return std::holds_alternative<WhileStep>(mStep); } in isWhile()
352 bool isGoto() const { return std::holds_alternative<GotoStep>(mStep); } in isGoto()
355 ExecutionStep* executionStep() { return &std::get<ExecutionStep>(mStep); } in executionStep()
356 IfStep* ifStep() { return &std::get<IfStep>(mStep); } in ifStep()
357 WhileStep* whileStep() { return &std::get<WhileStep>(mStep); } in whileStep()
358 GotoStep* gotoStep() { return &std::get<GotoStep>(mStep); } in gotoStep()
361 const ExecutionStep* executionStep() const { return &std::get<ExecutionStep>(mStep); } in executionStep()
362 const IfStep* ifStep() const { return &std::get<IfStep>(mStep); } in ifStep()
363 const WhileStep* whileStep() const { return &std::get<WhileStep>(mStep); } in whileStep()
364 const GotoStep* gotoStep() const { return &std::get<GotoStep>(mStep); } in gotoStep()
367 ExecutionStep* tryExecutionStep() { return std::get_if<ExecutionStep>(&mStep); } in tryExecutionStep()
368 IfStep* tryIfStep() { return std::get_if<IfStep>(&mStep); } in tryIfStep()
369 WhileStep* tryWhileStep() { return std::get_if<WhileStep>(&mStep); } in tryWhileStep()
370 GotoStep* tryGotoStep() { return std::get_if<GotoStep>(&mStep); } in tryGotoStep()
373 const ExecutionStep* tryExecutionStep() const { return std::get_if<ExecutionStep>(&mStep); } in tryExecutionStep()
374 const IfStep* tryIfStep() const { return std::get_if<IfStep>(&mStep); } in tryIfStep()
375 const WhileStep* tryWhileStep() const { return std::get_if<WhileStep>(&mStep); } in tryWhileStep()
376 const GotoStep* tryGotoStep() const { return std::get_if<GotoStep>(&mStep); } in tryGotoStep()
381 std::variant<ExecutionStep, IfStep, WhileStep, GotoStep> mStep;
384 std::string toString(const IfStep& step);
385 std::string toString(const WhileStep& step);
386 std::string toString(const GotoStep& step);
398 std::chrono::time_point<std::chrono::steady_clock> startTime;
449 std::map<SourceOperandIndex, uint32_t> sourceOperandToOffsetOfTemporary,
450 std::map<SourceOperandIndex, uint32_t> sourceOperandToOffsetOfTemporary2,
451 std::map<SourceOperandIndex, uint32_t> sourceOperandToInputIndex,
452 std::map<SourceOperandIndex, uint32_t> sourceOperandToOutputIndex,
453 const std::map<SourceOperandIndex, ConstantCopyLocation>&
455 std::map<SourceOperandIndex, ConstantReferenceLocation>
488 std::map<SourceOperandIndex, uint32_t> mSourceOperandToOffsetOfTemporary;
491 std::map<SourceOperandIndex, uint32_t> mSourceOperandToOffsetOfTemporary2;
493 std::map<SourceOperandIndex, uint32_t> mSourceOperandToInputIndex;
495 std::map<SourceOperandIndex, uint32_t> mSourceOperandToOutputIndex;
498 std::map<SourceOperandIndex, ConstantReferenceLocation> mSourceOperandToConstantReference;
499 std::unique_ptr<MemoryAshmem> mTemporaries;
505 std::unordered_map<size_t, WhileState> mWhileState;
510 std::vector<std::shared_ptr<ExecutionBurstController>> makeBursts(int preference) const;
512 std::shared_ptr<Controller> makeController(ExecutionBuilder* executionBuilder,
519 int next(std::shared_ptr<Controller> controller, std::shared_ptr<StepExecutor>* executor,
520 std::shared_ptr<ExecutionBurstController>* burstController = nullptr,
524 int fallback(std::shared_ptr<Controller> controller,
525 std::shared_ptr<StepExecutor>* executor) const;
528 const std::shared_ptr<Device> device);
536 void becomeSingleStep(const std::shared_ptr<Device> device, const ModelBuilder* model);
539 const std::optional<Deadline>& deadline);
551 void setCaching(const std::string* cacheDir, const uint8_t* token) { in setCaching()
555 const std::string* getCacheDir() const { return mCacheDir; } in getCacheDir()
580 std::shared_ptr<const Device> forTest_simpleGetDevice() const;
581 const std::vector<std::shared_ptr<LogicalStep>>& forTest_compoundGetSteps() const;
605 std::optional<Buffer> getBuffer(std::shared_ptr<Controller> controller,
607 std::optional<Buffer> getBufferFromModelArgumentInfo(
610 int readConditionValue(std::shared_ptr<Controller> controller, SourceOperandIndex operandIndex,
614 int nextCompound(std::shared_ptr<Controller> controller,
615 std::shared_ptr<StepExecutor>* executor,
616 std::shared_ptr<ExecutionBurstController>* burstController) const;
617 int nextCompound(const ExecutionStep* step, std::shared_ptr<Controller> controller,
618 std::shared_ptr<StepExecutor>* executor,
619 std::shared_ptr<ExecutionBurstController>* burstController) const;
620 int nextCompound(const IfStep* step, std::shared_ptr<Controller> controller,
621 std::shared_ptr<StepExecutor>* executor,
622 std::shared_ptr<ExecutionBurstController>* burstController) const;
623 int nextCompound(const WhileStep* step, std::shared_ptr<Controller> controller,
624 std::shared_ptr<StepExecutor>* executor,
625 std::shared_ptr<ExecutionBurstController>* burstController) const;
626 int nextCompound(const GotoStep* step, std::shared_ptr<Controller> controller,
627 std::shared_ptr<StepExecutor>* executor,
628 std::shared_ptr<ExecutionBurstController>* burstController) const;
634 int32_t priority, const std::optional<Deadline>& deadline) = 0;
644 SimpleBody(std::shared_ptr<Device> device, const ModelBuilder* model, in SimpleBody()
645 const std::string* cacheDir, const uint8_t* token) in SimpleBody()
650 const std::optional<Deadline>& deadline) override;
657 std::shared_ptr<Device> mDevice;
659 std::shared_ptr<PreparedModel> mPreparedModel;
661 const std::string* mCacheDir;
668 const std::optional<Deadline>& deadline) override;
681 std::vector<std::shared_ptr<LogicalStep>> mSteps;
687 std::map<SourceOperandIndex, uint32_t> mTemporaryToDefiningExecutionStep;
692 std::map<SourceOperandIndex, uint32_t> mSourceOperandToInputIndex;
697 std::map<SourceOperandIndex, uint32_t> mSourceOperandToOutputIndex;
702 std::map<SourceOperandIndex, ConstantCopyLocation> mSourceOperandToBoundaryConstantCopy;
708 std::map<SourceOperandIndex, ConstantReferenceLocation>
759 const std::string* mCacheDir = nullptr;
764 inline std::ostream& operator<<(std::ostream& out, ExecutionPlan::Kind kind) {