DMA & InlineToMemory Engines Rework.
This commit is contained in:
parent
b2099fbdcc
commit
f5fd6b5c86
21 changed files with 323 additions and 242 deletions
|
@ -24,4 +24,12 @@ template <class ForwardIt, class T, class Compare = std::less<>>
|
|||
return first != last && !comp(value, *first) ? first : last;
|
||||
}
|
||||
|
||||
template <typename T, typename Func, typename... Args>
|
||||
T FoldRight(T initial_value, Func&& func, Args&&... args) {
|
||||
T value{initial_value};
|
||||
const auto high_func = [&value, &func]<typename T>(T x) { value = func(value, x); };
|
||||
(std::invoke(high_func, std::forward<Args>(args)), ...);
|
||||
return value;
|
||||
}
|
||||
|
||||
} // namespace Common
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue