o
    Tæ«dÙ  ã                   @   s0   d dl mZmZ d dlmZ dd„ Zdd„ ZdS )é    )ÚdevicesÚdriver)Ú
cpu_targetc                 C   s   t j}| | ¡S )z,
    Use the ABI size in the CPU target
    )r   Útarget_contextÚcalc_array_sizeof)ÚndimÚctx© r	   úm/home/ncw/WWW/www-new/content/articles/pi-bbp/venv/lib/python3.10/site-packages/numba/cuda/cudadrv/ndarray.pyÚ_calc_array_sizeof   s   
r   c                 C   s   t  | ¡}t ¡  |¡}|S )z"
    Allocate gpu data buffer
    )r   Úhost_memory_sizer   Úget_contextÚmemalloc)ÚaryÚdatasizeÚgpu_datar	   r	   r
   Úndarray_device_allocate_data   s   
r   N)Únumba.cuda.cudadrvr   r   Únumba.core.registryr   r   r   r	   r	   r	   r
   Ú<module>   s    