U
    Ã9%eÙ  ã                   @   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   Ztarget_contextZcalc_array_sizeof)ÚndimÚctx© r   úY/var/www/html/Darija-Ai-API/env/lib/python3.8/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numba.cuda.cudadrvr   r   Znumba.core.registryr   r	   r
   r   r   r   r   Ú<module>   s   