refactored gpu functionality in core module

* optimize DeviceInfo class
* optimize ensureSizeIsEnough
* fix createContinuous