holoscan::FragmentScheduler

Beta
View as Markdown

The fragment scheduler class.

This class is responsible for scheduling the the set of fragments based on the available app workers.

#include <holoscan/fragment_scheduler.hpp>

Constructors

FragmentScheduler

holoscan::FragmentScheduler::FragmentScheduler(
std::unique_ptr<FragmentAllocationStrategy> &&allocation_strategy = {}
)

Destructor

~FragmentScheduler

virtual holoscan::FragmentScheduler::~FragmentScheduler()

Methods

add_resource_requirement

void holoscan::FragmentScheduler::add_resource_requirement(
const SystemResourceRequirement &resource_requirement
)

Add resource requirement for a fragment.

Parameters

resource_requirement
const SystemResourceRequirement &

The resource requirement for a fragment.

add_available_resource

void holoscan::FragmentScheduler::add_available_resource(
const AvailableSystemResource &available_resource
)

Add app worker resource.

Parameters

available_resource
const AvailableSystemResource &

The available resource for an app worker.

schedule

holoscan::expected<std::unordered_map<std::string, std::string>, std::string> holoscan::FragmentScheduler::schedule()

Schedule the fragments.

Returns: holoscan::expected<std::unordered_map<std::string, std::string>, std::string> The mapping from fragment name to app worker id.


Member variables

NameTypeDescription
strategy_std::unique_ptr< FragmentAllocationStrategy >