Use lazily-evaluated coroutines for expression templates #187
pfeatherstone
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Have you guys thought about using coroutines for the implementation details of an expression template?
You can lazily
co_await
tensor elements from previous operations andco_yield
tensor elements for the current implementation.The compiler could then hopefully see the entire "state machine" of the combined operation and lower that to something optimal.
Maybe that would work?
More crucially, for users needing to define custom operations in terms of an expression template, rather them customize some complicated class, they just define the operation in terms of a coroutine using loops.
Beta Was this translation helpful? Give feedback.
All reactions