Open
Description
We have a pattern of "apply schedule-directive to Func and also generate the textual C++ code for that directive to a stream" repeated in multiple autoschedulers; we should really pull all that logic out into a helper class to avoid redundancy and error. e.g. instead of
Func(f).store_in(MemoryType::Stack);
schedule_source << "\n .store_in(MemoryType::Stack)";
we should have something like
// h maintains schedule_source internally
SchedulerHelper h;
...
// calls f.store_in() and also appends to schedule_source
h.store_in(f, MemoryType::Stack);