Copy from device memory in global memory function implemented

Ha-ha