// Copyright Advanced Micro Devices, Inc., or its affiliates. // SPDX-License-Identifier: MIT #pragma once #include #include #include #include #include namespace rocRoller { class ScheduledInstructions { public: explicit ScheduledInstructions(ContextPtr ctx); ~ScheduledInstructions() = default; void schedule(const Instruction& instruction); std::string toString() const; /** * @brief Get the Executable Kernel object for the currently scheduled instructions. * * @return std::shared_ptr Returns a pointer to the Executable Kernel */ std::shared_ptr getExecutableKernel(); /** * @brief Assemble the currently scheduled instructions. * * @return std::vector The binary representation of the assembled instructions. */ std::vector assemble() const; void clear(); private: std::ostringstream m_instructionstream; std::weak_ptr m_context; }; }