B
      ›\  ã               @   sD   d dl mZmZmZ ddlmZmZ d dlmZ dd„ Z	dd„ Z
d	S )
é    )Úprint_functionÚabsolute_importÚdivisioné   )ÚdevicesÚdriver)Ú
cpu_targetc             C   s   t j}| | ¡S )z,
    Use the ABI size in the CPU target
    )r   Ztarget_contextZcalc_array_sizeof)ÚndimZctx© r
   ú9lib/python3.7/site-packages/numba/cuda/cudadrv/ndarray.pyÚ_calc_array_sizeof   s    r   c             C   s   t  | ¡}t ¡  |¡}|S )z"
    Allocate gpu data buffer
    )r   Zhost_memory_sizer   Zget_contextZmemalloc)ZaryZdatasizeZgpu_datar
   r
   r   Úndarray_device_allocate_data   s    
r   N)Z
__future__r   r   r   Ú r   r   Znumba.targets.registryr   r   r   r
   r
   r
   r   Ú<module>   s   