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

C++ Device_impl::updateUsageState() should be virtual #14

Open
jirwin-geon opened this issue Nov 26, 2019 · 0 comments
Open

C++ Device_impl::updateUsageState() should be virtual #14

jirwin-geon opened this issue Nov 26, 2019 · 0 comments

Comments

@jirwin-geon
Copy link
Contributor

Generated C++ devices have an updateUsageState() method that is meant to be called after an allocation or deallocation. The default Device_impl::updateUsageState() is not declared as virtual (Device_impl.h#149), so allocateCapacity() and deallocateCapacity() only call the empty base version, not the derived class implementation. As a result, custom non-FEI devices have to either override allocateCapacity() and deallocateCapacity() or otherwise change the device state.

This does not affect C++ FEI devices, which have a different, non-empty (and virtual) updateUsageState().

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