Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memoization Considerations for ModuleBase #229

Open
ryanmrichard opened this issue Mar 1, 2022 · 0 comments
Open

Memoization Considerations for ModuleBase #229

ryanmrichard opened this issue Mar 1, 2022 · 0 comments

Comments

@ryanmrichard
Copy link
Member

Right now whether a module can be memoized or not is handled by the Module class. The module developer ultimately knows whether memoization of a module is even possible. There needs to be a mechanism for module developers to signal whether or not their module is memoizable. This issue proposes a similar API to that of the Module class namely:

  • add bool m_is_memoizable_ to ModuleBase (defaults to true)
  • add public method bool is_memoizable() const noexcept to ModuleBase
  • add protected method void turn_on_memoization() noexcept to ModuleBase
  • add protected method void turn_off_memoization() noexcept to ModuleBase
  • Have ModuleBase::is_memoizable() == false always make Module::is_memoizable() return false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant