class_docstr: Interface to handle asynchronous data transfer using double buffering.
  
  An asynchronous data transfer is initiated by :meth:`put`, and the result,
  the array transferred to a target device, is obtained by :meth:`get`.
  You should call :meth:`put` followed by :meth:`get`.
  
  Args:
      device (int): Device ID to which an array is sent. Negative value
          indicates the host memory (CPU). If it is omitted, the array is
          left in the original device. Asynchronous data transfer is used
          only when device ID >= 0.
      stream (cupy.cuda.Stream): CUDA stream. An array is sent to GPU
          asynchronously using this stream. If ``None``, asynchronous data
          transfer is not used.
class_docstr_tok: ["Interface","to","handle","asynchronous","data","transfer","using","double","buffering",".","An","asynchronous","data","transfer","is","initiated","by",":","meth",":","`","put","`",",","and","the","result",",","the","array","transferred","to","a","target","device",",","is","obtained","by",":","meth",":","`","get","`",".","You","should","call",":","meth",":","`","put","`","followed","by",":","meth",":","`","get","`",".","Args",":","device","(","int",")",":","Device","ID","to","which","an","array","is","sent",".","Negative","value","indicates","the","host","memory","(","CPU",")",".","If","it","is","omitted",",","the","array","is","left","in","the","original","device",".","Asynchronous","data","transfer","is","used","only","when","device","ID",">","=","0.","stream","(","cupy.cuda.Stream",")",":","CUDA","stream",".","An","array","is","sent","to","GPU","asynchronously","using","this","stream",".","If","``","None","``",",","asynchronous","data","transfer","is","not","used","."]
docstr: Returns the array of data transferred to a target device asynchronously.
  
  If sync is ``True``, the data of returned array is available in GPU
  kernels. If sync is ``False``, the data of returned array might be
  being transferred to GPU, so synchronization must be done carefully by
  the calling function.
  
  Args:
      sync (bool): If ``True``, global synchronization is used to ensure
          completion of asynchronous data transfer for safer reason.
          If ``False``, it assumes a caller function is handling
          synchronization correctly hence does not use global
          synchronization.
docstr_tok: ["Returns","the","array","of","data","transferred","to","a","target","device","asynchronously",".","If","sync","is","``","True","``",",","the","data","of","returned","array","is","available","in","GPU","kernels",".","If","sync","is","``","False","``",",","the","data","of","returned","array","might","be","being","transferred","to","GPU",",","so","synchronization","must","be","done","carefully","by","the","calling","function",".","Args",":","sync","(","bool",")",":","If","``","True","``",",","global","synchronization","is","used","to","ensure","completion","of","asynchronous","data","transfer","for","safer","reason",".","If","``","False","``",",","it","assumes","a","caller","function","is","handling","synchronization","correctly","hence","does","not","use","global","synchronization","."]
code: def get(self, sync=True):
      """Returns the array of data transferred to a target device asynchronously.
  
      If sync is ``True``, the data of returned array is available in GPU
      kernels. If sync is ``False``, the data of returned array might be
      being transferred to GPU, so synchronization must be done carefully by
      the calling function.
  
      Args:
          sync (bool): If ``True``, global synchronization is used to ensure
              completion of asynchronous data transfer for safer reason.
              If ``False``, it assumes a caller function is handling
              synchronization correctly hence does not use global
              synchronization.
      """
      if (
          self._device is not None
          and self._device >= 0
          and self._stream is not None
      ):
          if sync:
              cuda.cupy.cuda.runtime.deviceSynchronize()
      return self._ret_array.pop(0)
  
imports: import collections
  import numpy
  import six
  import chainer
  from chainer import backend
  from chainer.backends import cuda
label_desc: Use image node_id 3 for calling the Conveyor obj's underlying member method code with example usage: obj.get(sync) and returns: self