parameters: (*args)
return_statement: return _AutoDeregister(args)
docstring: Register data into the HSA system
  
      Returns a contextmanager for use in with-context for auto deregistration.
  
      Use in context:
  
          with hsa.register(array):
              do_work_on_HSA(array)
docstring_summary: Register data into the HSA system
docstring_tokens: Register data into the HSA system
function: def register(*args):
      """Register data into the HSA system
  
      Returns a contextmanager for use in with-context for auto deregistration.
  
      Use in context:
  
          with hsa.register(array):
              do_work_on_HSA(array)
  
      """
      for data in args:
          if isinstance(data, np.ndarray):
              _hsadrv.hsa_memory_register(data.ctypes.data, data.nbytes)
          else:
              raise TypeError(type(data))
      return _AutoDeregister(args)
function_tokens: def register ( * args ) : for data in args : if isinstance ( data , np . ndarray ) : _hsadrv . hsa_memory_register ( data . ctypes . data , data . nbytes ) else : raise TypeError ( type ( data ) ) return _AutoDeregister ( args )