コード例 #1
0
ファイル: dispatch.py プロジェクト: ArtShp/DataScience
 def device_array(self, shape, dtype, stream):
     if dgpu_present:
         return api.device_array(shape=shape, dtype=dtype)
     else:
         return np.empty(shape=shape, dtype=dtype)
コード例 #2
0
ファイル: dispatch.py プロジェクト: cpcloud/numba
 def device_array(self, shape, dtype, stream):
     if dgpu_present:
         return api.device_array(shape=shape, dtype=dtype)
     else:
         return np.empty(shape=shape, dtype=dtype)