simplified the routines for loading parameters from/to GPU.