a helper function to create variable object from CPU/CUDA array
auto h = 0.5f.variable; auto d = h.to!DeviceStorage; assert(d.to!HostStorage.data == h.data);
See Implementation
a helper function to create variable object from CPU/CUDA array