Skip to content

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

@jirwin-geon

Description

@jirwin-geon

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().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions