def _get_device(devnum=0):
 if (not _custack):
  _custack.push(get_gpu(devnum))
 return _custack.top

def _get_device ( devnum = 0 ) : if ( not _custack ) : _custack . push ( get_gpu ( devnum ) ) return _custack . top
get the current device or use a device by device number .