Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //This allows black box modules to easily specify a pipeline latency by intializing their queues
- template <typename T>
- constexpr std::deque<T> func(int n)
- {
- std::deque<T> ret;
- for(int i=0; i < n; i++)
- ret.push_back(T());
- return ret;
- }
- #define PIPELINE(T,x) \
- static std::deque<__typeof__(T)> deq_##T = func<__typeof__(T)>(x); \
- deq_##T.push_back(T); \
- T = deq_##T.front(); \
- deq_##T.pop_front();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement