// Copyright Advanced Micro Devices, Inc., or its affiliates. // SPDX-License-Identifier: MIT #pragma once #include #include #include #include #include namespace rocRoller { namespace Scheduling { /** * A subclass for Sequential scheduling * * Takes every instruction from the first stream, then every instruction * from the second stream, and so on. * * Supports adding streams. This scheduler will also preemptively take * comments from the beginning of new streams, for the purpose of finding * and running Deallocate nodes as soon as they are available. */ class SequentialScheduler : public Scheduler { public: SequentialScheduler(ContextPtr); using Base = Scheduler; inline static const std::string Name = "SequentialScheduler"; static bool Match(Argument arg); static std::shared_ptr Build(Argument arg); /** * Return Name of `SequentialScheduler`, used for debugging purposes currently */ std::string name() const override; bool supportsAddingStreams() const override; Generator operator()(std::vector>& seqs) override; }; } }