- use impl ptr pattern for DeviceGraph