§
    1@Äj…}  ã                   ó6  — d Z ddlZddlZddlZddlZddlmZ ddlZddl	Z	ddl	m
Z
 ddlmZmZ ddlmZ ddlmZmZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZ 	   eed¦  «        d¦  «        Z n# e!$ r d„ Z Y nw xY wd„ Z"d„ Z#d„ Z$ G d„ de
j%        ¦  «        Z& G d„ de&¦  «        Z'e d„ ¦   «         Z( G d„ de&¦  «        Z) G d„ de*¦  «        Z+ G d„ de&ej,        ¦  «        Z- G d„ de&ej,        ¦  «        Z.d*d „Z/d*d!„Z0d"„ Z1d#„ Z2d$Z3d%„ Z4d+d(„Z5d)„ Z6dS ),zÑ
A CUDA ND Array is recognized by checking the __cuda_memory__ attribute
on the object.  If it exists and evaluate to True, it must define shape,
strides, dtype and size attributes similar to a NumPy ndarray.
é    N)Úc_void_p)Ú_devicearray)ÚdevicesÚ
dummyarray)Údriver)ÚtypesÚconfig)Úto_fixed_tuple)Únumpy_version)Únumpy_support)Úprepare_shape_strides_dtype)ÚNumbaPerformanceWarning)ÚwarnÚ	lru_cachec                 ó   — | S ©N© )Úfuncs    úOC:\Projects\Historical\venv\Lib\site-packages\numba/cuda/cudadrv/devicearray.pyr   r      s   € Øˆó    c                 ó$   — t          | dd¦  «        S )z$Check if an object is a CUDA ndarrayÚ__cuda_ndarray__F)Úgetattr©Úobjs    r   Úis_cuda_ndarrayr   #   s   € å�3Ð*¨EÑ2Ô2Ð2r   c                 óÂ   ‡ — t          ‰ ¦  «         ˆ fd„} |dt          ¦  «          |dt          ¦  «          |dt          j        ¦  «          |dt          ¦  «         dS )z,Verify the CUDA ndarray interface for an objc                 óª   •— t          ‰| ¦  «        st          | ¦  «        ‚t          t          ‰| ¦  «        |¦  «        st          | ›d|›�¦  «        ‚d S )Nz must be of type )ÚhasattrÚAttributeErrorÚ
isinstancer   )ÚattrÚtypr   s     €r   Úrequires_attrz4verify_cuda_ndarray_interface.<locals>.requires_attr,   se   ø€ Ý�s˜DÑ!Ô!ð 	'Ý  Ñ&Ô&Ð&Ý�' # tÑ,Ô,¨cÑ2Ô2ð 	HÝ ¸D¸D¸DÀ#À#Ð!FÑGÔGÐGð	Hð 	Hr   ÚshapeÚstridesÚdtypeÚsizeN)Úrequire_cuda_ndarrayÚtupleÚnpr'   Úint)r   r$   s   ` r   Úverify_cuda_ndarray_interfacer-   (   s�   ø€ å˜ÑÔÐðHð Hð Hð Hð Hð €M�'�5Ñ!Ô!Ð!Ø€M�)�UÑ#Ô#Ð#Ø€M�'�2œ8Ñ$Ô$Ð$Ø€M�&�#ÑÔÐÐÐr   c                 óB   — t          | ¦  «        st          d¦  «        ‚dS )z9Raises ValueError is is_cuda_ndarray(obj) evaluates Falsezrequire an cuda ndarray objectN)r   Ú
ValueErrorr   s    r   r)   r)   8   s+   € å˜3ÑÔð ;ÝÐ9Ñ:Ô:Ð:ð;ð ;r   c                   ó  — e Zd ZdZdZdZdd„Zed„ ¦   «         Zdd„Z	ed„ ¦   «         Z
dd	„Zd
„ Zed„ ¦   «         Zed„ ¦   «         Zej        dd„¦   «         Zej        dd„¦   «         Zdd„Zd„ Zd„ Zdd„Zd„ Zed„ ¦   «         ZdS )ÚDeviceNDArrayBasez$A on GPU NDArray representation
    Tr   Nc                 ó  — t          |t          ¦  «        r|f}t          |t          ¦  «        r|f}t          j        |¦  «        }t	          |¦  «        | _        t	          |¦  «        | j        k    rt          d¦  «        ‚t          j         	                    d|||j
        ¦  «        | _        t          |¦  «        | _        t          |¦  «        | _        || _        t          t          j        t"          j        | j        d¦  «        ¦  «        | _        | j        dk    rw|€[t)          j        | j        | j        | j        j
        ¦  «        | _        t/          j        ¦   «                              | j        ¦  «        }n„t)          j        |¦  «        | _        njt(          j        r t(          j                             d¦  «        }nt=          d¦  «        }t)          j        t/          j        ¦   «         |d¬¦  «        }d| _        || _         || _!        dS )a5  
        Args
        ----

        shape
            array shape.
        strides
            array strides.
        dtype
            data type as np.dtype coercible object.
        stream
            cuda stream.
        gpu_data
            user provided device memory for the ndarray data buffer
        zstrides not match ndimr   é   N)ÚcontextÚpointerr(   )"r!   r,   r+   r'   ÚlenÚndimr/   r   ÚArrayÚ	from_descÚitemsizeÚ_dummyr*   r%   r&   Ú	functoolsÚreduceÚoperatorÚmulr(   Ú_driverÚmemory_size_from_infoÚ
alloc_sizer   Úget_contextÚmemallocÚdevice_memory_sizeÚUSE_NV_BINDINGÚbindingÚCUdeviceptrr   ÚMemoryPointerÚgpu_dataÚstream)Úselfr%   r&   r'   rK   rJ   Únulls          r   Ú__init__zDeviceNDArrayBase.__init__D   s¹  € õ  �e�SÑ!Ô!ð 	Ø�HˆEÝ�g�sÑ#Ô#ð 	!Ø�jˆGÝ”˜‘”ˆÝ˜‘J”JˆŒ	Ýˆw‰<Œ<˜4œ9Ò$Ð$ÝÐ5Ñ6Ô6Ð6Ý Ô&×0Ò0°°E¸7Ø16´ñAô AˆŒå˜5‘\”\ˆŒ
Ý˜W‘~”~ˆŒØˆŒ
Ý�	Ô(­¬°t´zÀ1ÑEÔEÑFÔFˆŒ	àŒ9�qŠ=ˆ=ØÐÝ")Ô"?Ø”J ¤¨d¬jÔ.Añ#Cô #C�”å"Ô.Ñ0Ô0×9Ò9¸$¼/ÑJÔJ��å")Ô"<¸XÑ"FÔ"F�”�õ Ô%ð #Ý”×2Ò2°1Ñ5Ô5��å ‘{”{�ÝÔ,µWÔ5HÑ5JÔ5JØ59ÀðCñ Cô CˆHàˆDŒOà ˆŒØˆŒˆˆr   c                 ó`  — t           j        r| j        �t          | j        ¦  «        }nd}n| j        j        �| j        j        }nd}t          | j        ¦  «        t          | ¦  «        rd nt          | j        ¦  «        |df| j	        j
        | j        dk    rt          | j        ¦  «        nd ddœS )Nr   Fé   )r%   r&   ÚdataÚtypestrrK   Úversion)r@   rF   Údevice_ctypes_pointerr,   Úvaluer*   r%   Úis_contiguousr&   r'   ÚstrrK   )rL   Úptrs     r   Ú__cuda_array_interface__z*DeviceNDArrayBase.__cuda_array_interface__w   s¸   € åÔ!ð 		ØÔ)Ð5Ý˜$Ô4Ñ5Ô5��à��àÔ)Ô/Ð;ØÔ0Ô6��à�õ ˜4œ:Ñ&Ô&Ý,¨TÑ2Ô2ÐK�t�t½¸d¼lÑ8KÔ8KØ˜%�LØ”z”~Ø*.¬+¸Ò*:Ð*:•c˜$œ+Ñ&Ô&Ð&ÀØð
ð 
ð 	
r   c                 ó<   — t          j         | ¦  «        }||_        |S )zBind a CUDA stream to this object so that all subsequent operation
        on this array defaults to the given stream.
        )ÚcopyrK   )rL   rK   Úclones      r   ÚbindzDeviceNDArrayBase.bind�   s   € õ ”	˜$‘”ˆØˆŒØˆr   c                 ó*   — |                       ¦   «         S r   ©Ú	transpose©rL   s    r   ÚTzDeviceNDArrayBase.T•   s   € à�~Š~ÑÔÐr   c                 óT  — |r4t          |¦  «        t          t          | j        ¦  «        ¦  «        k    r| S | j        dk    rd}t          |¦  «        ‚|�Dt	          |¦  «        t	          t          | j        ¦  «        ¦  «        k    rt          d|›�¦  «        ‚ddlm}  || ¦  «        S )Né   z2transposing a non-2D DeviceNDArray isn't supportedzinvalid axes list r   r_   )r*   Úranger7   ÚNotImplementedErrorÚsetr/   Únumba.cuda.kernels.transposer`   )rL   ÚaxesÚmsgr`   s       r   r`   zDeviceNDArrayBase.transpose™   s¬   € Øð 		#•E˜$‘K”K¥5­¨t¬yÑ)9Ô)9Ñ#:Ô#:Ò:Ð:ØˆKØŒY˜!Š^ˆ^ØFˆCÝ% cÑ*Ô*Ð*ØÐ¥# d¡)¤)­sµ5¸¼Ñ3CÔ3CÑ/DÔ/DÒ"DÐ"DÝ�*°t°tÐ=Ñ>Ô>Ð>à>Ð>Ð>Ð>Ð>Ð>Ø�9˜T‘?”?Ð"r   c                 ó   — |s| j         n|S r   ©rK   )rL   rK   s     r   Ú_default_streamz!DeviceNDArrayBase._default_stream¥   s   € Ø"(Ð4ˆtŒ{ˆ{¨fÐ4r   c                 óÈ   — d| j         v }| j        d         r|sd}n| j        d         r|sd}nd}t          j        | j        ¦  «        }t          j        || j        |¦  «        S )ún
        Magic attribute expected by Numba to get the numba type that
        represents this object.
        r   ÚC_CONTIGUOUSÚCÚF_CONTIGUOUSÚFÚA)r&   Úflagsr   Ú
from_dtyper'   r   r8   r7   )rL   Ú	broadcastÚlayoutr'   s       r   Ú_numba_type_zDeviceNDArrayBase._numba_type_¨   sw   € ð( ˜œÐ%ˆ	ØŒ:�nÔ%ð 	¨ið 	ØˆFˆFØŒZ˜Ô'ð 	°	ð 	ØˆFˆFàˆFåÔ(¨¬Ñ4Ô4ˆÝŒ{˜5 $¤)¨VÑ4Ô4Ð4r   c                 óœ   — | j         €:t          j        rt          j                             d¦  «        S t          d¦  «        S | j         j        S )z:Returns the ctypes pointer to the GPU data buffer
        Nr   )rJ   r@   rF   rG   rH   r   rT   ra   s    r   rT   z'DeviceNDArrayBase.device_ctypes_pointerÇ   sD   € ð Œ=Ð ÝÔ%ð #Ý”×2Ò2°1Ñ5Ô5Ð5å ‘{”{Ð"à”=Ô6Ð6r   c                 ó"  — |j         dk    rdS t          | ¦  «         |                      |¦  «        }t          | ¦  «        t          |¦  «        }}t	          j        |¦  «        r>t          |¦  «         t          ||¦  «         t	          j        | || j        |¬¦  «         dS t          j
        ||j        d         rdnddt          dk     r|j        d	          nd¬
¦  «        }t          ||¦  «         t	          j        | || j        |¬¦  «         dS )zŸCopy `ary` to `self`.

        If `ary` is a CUDA memory, perform a device-to-device transfer.
        Otherwise, perform a a host-to-device transfer.
        r   Nrl   rp   rq   rs   T©rd   r   Ú	WRITEABLE)ÚorderÚsubokr[   )r(   Úsentry_contiguousrm   Ú
array_corer@   Úis_device_memoryÚcheck_array_compatibilityÚdevice_to_devicerB   r+   Úarrayru   r   Úhost_to_device)rL   ÚaryrK   Ú	self_coreÚary_cores        r   Úcopy_to_devicez DeviceNDArrayBase.copy_to_deviceÓ   s1  € ð Œ8�qŠ=ˆ=àˆFå˜$ÑÔÐØ×%Ò% fÑ-Ô-ˆå(¨Ñ.Ô.µ
¸3±´�8ˆ	ÝÔ# CÑ(Ô(ð 	2Ý˜cÑ"Ô"Ð"Ý% i°Ñ:Ô:Ð:ÝÔ$ T¨3°´ÈÐOÑOÔOÐOÐOÐOõ ”xØØ&œ_¨^Ô<ÐE�c�cÀ#Øå  6Ò)Ð)ð #œ.¨Ô5Ð5Ð5Ø/3ð5ñ 5ô 5ˆHõ & i°Ñ:Ô:Ð:ÝÔ" 4¨°4´?Ø*0ð2ñ 2ô 2ð 2ð 2ð 2r   c                 óX  — t          d„ | j        D ¦   «         ¦  «        r)d}t          |                     | j        ¦  «        ¦  «        ‚| j        dk    s
J d¦   «         ‚|                      |¦  «        }|€&t          j        | j        t          j        ¬¦  «        }nt          | |¦  «         |}| j        dk    rt          j        || | j        |¬¦  «         |€T| j        dk    r"t          j        | j        | j        |¬¦  «        }n't          j        | j        | j        | j        |¬	¦  «        }|S )
a^  Copy ``self`` to ``ary`` or create a new Numpy ndarray
        if ``ary`` is ``None``.

        If a CUDA ``stream`` is given, then the transfer will be made
        asynchronously as part as the given stream.  Otherwise, the transfer is
        synchronous: the function returns after the copy is finished.

        Always returns the host array.

        Example::

            import numpy as np
            from numba import cuda

            arr = np.arange(1000)
            d_arr = cuda.to_device(arr)

            my_kernel[100, 100](d_arr)

            result_array = d_arr.copy_to_host()
        c              3   ó"   K  — | ]
}|d k     V — ŒdS ©r   Nr   )Ú.0Úss     r   ú	<genexpr>z1DeviceNDArrayBase.copy_to_host.<locals>.<genexpr>
  s&   è è € Ð+Ð+˜ˆq�1ŠuÐ+Ð+Ð+Ð+Ð+Ð+r   z2D->H copy not implemented for negative strides: {}r   zNegative memory sizeN©r%   r'   rl   )r%   r'   Úbuffer)r%   r'   r&   r’   )Úanyr&   rf   ÚformatrB   rm   r+   ÚemptyÚbyterƒ   r@   Údevice_to_hostr(   Úndarrayr%   r'   )rL   r‡   rK   rj   Úhostarys        r   Úcopy_to_hostzDeviceNDArrayBase.copy_to_hostó   s@  € õ. Ð+Ð+˜dœlÐ+Ñ+Ô+Ñ+Ô+ð 	@ØFˆCÝ% c§j¢j°´Ñ&>Ô&>Ñ?Ô?Ð?ØŒ !Ò#Ð#Ð#Ð%;Ñ#Ô#Ð#Ø×%Ò% fÑ-Ô-ˆØˆ;Ý”h T¤_½B¼GÐDÑDÔDˆGˆGå% d¨CÑ0Ô0Ð0ØˆGàŒ?˜aÒÐÝÔ" 7¨D°$´/Ø*0ð2ñ 2ô 2ð 2ð ˆ;ØŒy˜AŠ~ˆ~Ýœ*¨4¬:¸T¼ZØ,3ð5ñ 5ô 5��õ œ*¨4¬:¸T¼ZØ-1¬\À'ðKñ Kô K�àˆr   c              #   ó0  K  — |                       |¦  «        }| j        dk    rt          d¦  «        ‚| j        d         | j        j        k    rt          d¦  «        ‚t          t          j        t          | j
        ¦  «        |z  ¦  «        ¦  «        }| j        }| j        j        }t          |¦  «        D ]a}||z  }t          ||z   | j
        ¦  «        }||z
  f}	| j                             ||z  ||z  ¦  «        }
t          |	|| j        ||
¬¦  «        V — ŒbdS )zžSplit the array into equal partition of the `section` size.
        If the array cannot be equally divided, the last section will be
        smaller.
        r3   zonly support 1d arrayr   zonly support unit stride©r'   rK   rJ   N)rm   r7   r/   r&   r'   r:   r,   ÚmathÚceilÚfloatr(   re   ÚminrJ   ÚviewÚDeviceNDArray)rL   ÚsectionrK   Únsectr&   r:   ÚiÚbeginÚendr%   rJ   s              r   ÚsplitzDeviceNDArrayBase.split"  s,  è è € ð
 ×%Ò% fÑ-Ô-ˆØŒ9˜Š>ˆ>ÝÐ4Ñ5Ô5Ð5ØŒ<˜Œ?˜dœjÔ1Ò1Ð1ÝÐ7Ñ8Ô8Ð8Ý•D”I�e D¤IÑ.Ô.°Ñ8Ñ9Ô9Ñ:Ô:ˆØ”,ˆØ”:Ô&ˆÝ�u‘”ð 	3ð 	3ˆAØ˜‘KˆEÝ�e˜g‘o t¤yÑ1Ô1ˆCØ˜5‘[�NˆEØ”}×)Ò)¨%°(Ñ*:¸CÀ(¹NÑKÔKˆHÝ  w°d´jÈØ)1ð3ñ 3ô 3ð 3ð 3ð 3ð 3ð	3ð 	3r   c                 ó   — | j         S )zEReturns a device memory object that is used as the argument.
        )rJ   ra   s    r   Úas_cuda_argzDeviceNDArrayBase.as_cuda_arg7  s   € ð Œ}Ðr   c                 ó¼   — t          j        ¦   «                              | j        ¦  «        }t	          | j        | j        | j        ¬¦  «        }t          ||¬¦  «        S )zÌ
        Returns a *IpcArrayHandle* object that is safe to serialize and transfer
        to another process to share the local allocation.

        Note: this feature is only available on Linux.
        )r%   r&   r'   )Ú
ipc_handleÚ
array_desc)	r   rC   Úget_ipc_handlerJ   Údictr%   r&   r'   ÚIpcArrayHandle)rL   ÚipchÚdescs      r   r®   z DeviceNDArrayBase.get_ipc_handle<  sO   € õ Ô"Ñ$Ô$×3Ò3°D´MÑBÔBˆÝ˜$œ*¨d¬lÀ$Ä*ÐMÑMÔMˆÝ¨¸$Ð?Ñ?Ô?Ð?r   c                 ó´   — | j                              |¬¦  «        \  }}t          |j        |j        | j        |                      |¦  «        | j        ¬¦  «        S )a(  
        Remove axes of size one from the array shape.

        Parameters
        ----------
        axis : None or int or tuple of ints, optional
            Subset of dimensions to remove. A `ValueError` is raised if an axis
            with size greater than one is selected. If `None`, all axes with
            size one are removed.
        stream : cuda stream or 0, optional
            Default stream for the returned view of the array.

        Returns
        -------
        DeviceNDArray
            Squeezed view into the array.

        )Úaxis©r%   r&   r'   rK   rJ   )r;   Úsqueezer¢   r%   r&   r'   rm   rJ   )rL   r´   rK   Ú	new_dummyÚ_s        r   r¶   zDeviceNDArrayBase.squeezeG  s]   € ð& ”{×*Ò*°Ð*Ñ5Ô5‰ˆ	�1ÝØ”/ØÔ%Ø”*Ø×'Ò'¨Ñ/Ô/Ø”]ð
ñ 
ô 
ð 	
r   c                 óÀ  — t          j        |¦  «        }t          | j        ¦  «        }t          | j        ¦  «        }| j        j        |j        k    rp|                      ¦   «         st          d¦  «        ‚t          |d         | j        j        z  |j        ¦  «        \  |d<   }|dk    rt          d¦  «        ‚|j        |d<   t          |||| j
        | j        ¬¦  «        S )zeReturns a new object by reinterpretting the dtype without making a
        copy of the data.
        zHTo change to a dtype of a different size, the array must be C-contiguouséÿÿÿÿr   zuWhen changing to a larger dtype, its size must be a divisor of the total size in bytes of the last axis of the array.rµ   )r+   r'   Úlistr%   r&   r:   Úis_c_contiguousr/   Údivmodr¢   rK   rJ   )rL   r'   r%   r&   Úrems        r   r¡   zDeviceNDArrayBase.viewc  sô   € õ ”˜‘”ˆÝ�T”ZÑ Ô ˆÝ�t”|Ñ$Ô$ˆàŒ:Ô %¤.Ò0Ð0Ø×'Ò'Ñ)Ô)ð Ý ð6ñô ð õ
 $Ø�b”	˜DœJÔ/Ñ/Ø”ñô ‰NˆE�"‰I�sð
 �aŠxˆxÝ ð6ñô ð ð  œ.ˆG�B‰KåØØØØ”;Ø”]ð
ñ 
ô 
ð 	
r   c                 ó*   — | j         j        | j        z  S r   )r'   r:   r(   ra   s    r   ÚnbyteszDeviceNDArrayBase.nbytesˆ  s   € ð
 ŒzÔ" T¤YÑ.Ð.r   r�   ©r   r   ©Nr   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú__cuda_memory__r   rN   ÚpropertyrY   r]   rb   r`   rm   ry   rT   r   Úrequire_contextrŠ   rš   r¨   rª   r®   r¶   r¡   rÀ   r   r   r   r1   r1   >   sž  € € € € € ðð à€OØÐð1ð 1ð 1ð 1ðf ð
ð 
ñ „Xð
ð*ð ð ð ð ð ð  ñ „Xð ð
#ð 
#ð 
#ð 
#ð5ð 5ð 5ð ð5ð 5ñ „Xð5ð< ð	7ð 	7ñ „Xð	7ð Ôð2ð 2ð 2ñ Ôð2ð> Ôð,ð ,ð ,ñ Ôð,ð\3ð 3ð 3ð 3ð*ð ð ð
	@ð 	@ð 	@ð
ð 
ð 
ð 
ð8#
ð #
ð #
ðJ ð/ð /ñ „Xð/ð /ð /r   r1   c                   óä   ‡ — e Zd ZdZdˆ fd„	Zed„ ¦   «         Zed„ ¦   «         Zej	        d„ ¦   «         Z
ej	        dd„¦   «         Zdd	„Zej	        d
„ ¦   «         Zej	        dd„¦   «         Zdd„Zˆ xZS )ÚDeviceRecordz
    An on-GPU record type
    r   Nc                 óh   •— d}d}t          t          | ¦  «                             |||||¦  «         d S ©Nr   )ÚsuperrË   rN   )rL   r'   rK   rJ   r%   r&   Ú	__class__s         €r   rN   zDeviceRecord.__init__”  sD   ø€ ØˆØˆÝ�l˜DÑ!Ô!×*Ò*¨5°'¸5À&Ø+3ñ	5ô 	5ð 	5ð 	5ð 	5r   c                 ó4   — t          | j        j        ¦  «        S ©zÿ
        For `numpy.ndarray` compatibility. Ideally this would return a
        `np.core.multiarray.flagsobj`, but that needs to be constructed
        with an existing `numpy.ndarray` (as the C- and F- contiguous flags
        aren't writeable).
        ©r¯   r;   ru   ra   s    r   ru   zDeviceRecord.flagsš  ó   € õ �D”KÔ%Ñ&Ô&Ð&r   c                 ó4   — t          j        | j        ¦  «        S )ro   )r   rv   r'   ra   s    r   ry   zDeviceRecord._numba_type_¤  s   € õ Ô'¨¬
Ñ3Ô3Ð3r   c                 ó,   — |                       |¦  «        S r   ©Ú_do_getitem©rL   Úitems     r   Ú__getitem__zDeviceRecord.__getitem__¬  ó   € à×Ò Ñ%Ô%Ð%r   c                 ó.   — |                       ||¦  «        S ©z0Do `__getitem__(item)` with CUDA stream
        rÖ   ©rL   rÙ   rK   s      r   ÚgetitemzDeviceRecord.getitem°  ó   € ð ×Ò  fÑ-Ô-Ð-r   c                 ó¼  — |                       |¦  «        }| j        j        |         \  }}| j                             |¦  «        }|j        dk    rT|j        �t          |||¬¦  «        S t          j	        d|¬¦  «        }t          j        |||j        |¬¦  «         |d         S t          |j        d |j        d         d¦  «        \  }}}	t          |||	||¬¦  «        S )	Nr   rœ   r3   ©r'   ©ÚdstÚsrcr(   rK   r   rq   ©r%   r&   r'   rJ   rK   )rm   r'   ÚfieldsrJ   r¡   r%   ÚnamesrË   r+   r•   r@   r—   r:   r   Úsubdtyper¢   )
rL   rÙ   rK   r#   ÚoffsetÚnewdatar™   r%   r&   r'   s
             r   r×   zDeviceRecord._do_getitem¶  s	  € Ø×%Ò% fÑ-Ô-ˆØ”jÔ'¨Ô-‰ˆˆVØ”-×$Ò$ VÑ,Ô,ˆàŒ9˜Š?ˆ?ØŒyÐ$Ý#¨#°fØ-4ð6ñ 6ô 6ð 6õ œ( 1¨CÐ0Ñ0Ô0�ÝÔ&¨7¸Ø,/¬LØ.4ð6ñ 6ô 6ð 6ð ˜1”:Ðõ ,¨C¬IØ,0Ø,/¬L¸¬O¸SñBô Bñ "ˆE�7˜Eõ ! u°gØ',°wØ(.ð0ñ 0ô 0ð 0r   c                 ó.   — |                       ||¦  «        S r   ©Ú_do_setitem©rL   ÚkeyrU   s      r   Ú__setitem__zDeviceRecord.__setitem__Î  ó   € à×Ò  UÑ+Ô+Ð+r   c                 ó2   — |                       |||¬¦  «        S ©z6Do `__setitem__(key, value)` with CUDA stream
        rl   rí   ©rL   rð   rU   rK   s       r   ÚsetitemzDeviceRecord.setitemÒ  ó   € ð ×Ò  U°6ÐÑ:Ô:Ð:r   c                 óæ  — |                       |¦  «        }| }|r't          j        ¦   «         }|                     ¦   «         }| j        j        |         \  }}| j                             |¦  «        } t          | ¦  «        |||¬¦  «        }	t          |	j                             |¦  «        |¬¦  «        \  }
}t          j        |	|
|
j        j        |¦  «         |r|                     ¦   «          d S d S )Nrœ   rl   )rm   r   rC   Úget_default_streamr'   rç   rJ   r¡   ÚtypeÚauto_devicer@   r„   r:   Úsynchronize)rL   rð   rU   rK   ÚsynchronousÚctxr#   rê   rë   ÚlhsÚrhsr¸   s               r   rî   zDeviceRecord._do_setitemØ  sù   € à×%Ò% fÑ-Ô-ˆð
 !�jˆØð 	.ÝÔ%Ñ'Ô'ˆCØ×+Ò+Ñ-Ô-ˆFð ”jÔ'¨Ô,‰ˆˆVØ”-×$Ò$ VÑ,Ô,ˆà�d�4‰jŒj˜s¨6¸GÐDÑDÔDˆõ ˜SœYŸ^š^¨EÑ2Ô2¸6ÐBÑBÔB‰ˆˆQõ 	Ô   c¨3¬9Ô+=¸vÑFÔFÐFàð 	!Ø×ÒÑ Ô Ð Ð Ð ð	!ð 	!r   r�   rÁ   )rÃ   rÄ   rÅ   rÆ   rN   rÈ   ru   ry   r   rÉ   rÚ   rß   r×   rñ   rö   rî   Ú__classcell__)rÏ   s   @r   rË   rË   �  s+  ø€ € € € € ðð ð5ð 5ð 5ð 5ð 5ð 5ð ð'ð 'ñ „Xð'ð ð4ð 4ñ „Xð4ð Ôð&ð &ñ Ôð&ð Ôð.ð .ð .ñ Ôð.ð
0ð 0ð 0ð 0ð0 Ôð,ð ,ñ Ôð,ð Ôð;ð ;ð ;ñ Ôð;ð
!ð !ð !ð !ð !ð !ð !ð !r   rË   c                 ól   ‡ ‡— ddl mŠ ‰ dk    r‰j        d„ ¦   «         }|S ‰j        ˆˆ fd„¦   «         }|S )zÙ
    A separate method so we don't need to compile code every assignment (!).

    :param ndim: We need to have static array sizes for cuda.local.array, so
        bake in the number of dimensions into the kernel
    r   )Úcudac                 ó   — |d         | d<   d S rÍ   r   )rÿ   r   s     r   Úkernelz_assign_kernel.<locals>.kernel  s   € à˜"”gˆC�‰GˆGˆGr   c                 ó  •— ‰                      d¦  «        }d}t          | j        ¦  «        D ]}|| j        |         z  }Œ||k    rd S ‰j                             d‰ft          j        ¬¦  «        }t          ‰dz
  dd¦  «        D ]N}|| j        |         z  |d|f<   || j        |         z  |j        |         dk    z  |d|f<   || j        |         z  }ŒO|t          |d         ‰¦  «                 | t          |d         ‰¦  «        <   d S )Nr3   rd   r‘   rº   r   )	Úgridre   r7   r%   Úlocalr…   r   Úint64r
   )rÿ   r   ÚlocationÚ
n_elementsr¥   Úidxr  r7   s         €€r   r  z_assign_kernel.<locals>.kernel  s   ø€ à—9’9˜Q‘<”<ˆàˆ
Ý�s”x‘”ð 	'ð 	'ˆAØ˜#œ) Aœ,Ñ&ˆJˆJØ�zÒ!Ð!ð ˆFð Œj×ÒØ�d�)Ý”+ð ñ ô ˆõ �t˜a‘x  RÑ(Ô(ð 	&ð 	&ˆAØ  3¤9¨Q¤<Ñ/ˆC��1�‰IØ! C¤I¨a¤LÑ0°S´Y¸q´\ÀAÒ5EÑFˆC��1�‰IØ˜œ 1œÑ%ˆHˆHà,/µ¸sÀ1¼vÀtÑ0LÔ0LÔ,Mˆ�N˜3˜qœ6 4Ñ(Ô(Ñ)Ð)Ð)r   )Únumbar  Újit)r7   r  r  s   ` @r   Ú_assign_kernelr  ÷  sx   øø€ ð ÐÐÐÐÐàˆq‚y€yà	Œð	ð 	ñ 
Œð	àˆà	„XðNð Nð Nð Nð Nñ „XðNð. €Mr   c                   óä   — e Zd ZdZd„ Zed„ ¦   «         Zd„ Zdd„Zd„ Z	d„ Z
dd„Zej        d„ ¦   «         Zej        dd„¦   «         Zdd„Zej        d„ ¦   «         Zej        dd„¦   «         Zdd„ZdS )r¢   z
    An on-GPU array type
    c                 ó   — | j         j        S )zA
        Return true if the array is Fortran-contiguous.
        )r;   Úis_f_contigra   s    r   Úis_f_contiguouszDeviceNDArray.is_f_contiguous'  ó   € ð Œ{Ô&Ð&r   c                 ó4   — t          | j        j        ¦  «        S rÑ   rÒ   ra   s    r   ru   zDeviceNDArray.flags-  rÓ   r   c                 ó   — | j         j        S )z;
        Return true if the array is C-contiguous.
        )r;   Úis_c_contigra   s    r   r¼   zDeviceNDArray.is_c_contiguous7  r  r   Nc                 ó    — |r'|                       ¦   «                              |¦  «        S |                       ¦   «                              ¦   «         S )zE
        :return: an `numpy.ndarray`, so copies to the host.
        )rš   Ú	__array__)rL   r'   s     r   r  zDeviceNDArray.__array__=  sJ   € ð ð 	3Ø×$Ò$Ñ&Ô&×0Ò0°Ñ7Ô7Ð7à×$Ò$Ñ&Ô&×0Ò0Ñ2Ô2Ð2r   c                 ó   — | j         d         S rÂ   )r%   ra   s    r   Ú__len__zDeviceNDArray.__len__F  s   € ØŒz˜!Œ}Ðr   c                 ó¦  — t          |¦  «        dk    r*t          |d         t          t          f¦  «        r|d         }t	          | ¦  «        }|| j        k    r# || j        | j        | j        | j        ¬¦  «        S  | j	        j
        |i |¤Ž\  }}|| j	        j        gk    r# ||j        |j        | j        | j        ¬¦  «        S t          d¦  «        ‚)z¿
        Reshape the array without changing its contents, similarly to
        :meth:`numpy.ndarray.reshape`.

        Example::

            d_arr = d_arr.reshape(20, 50, order='F')
        r3   r   )r%   r&   r'   rJ   úoperation requires copying)r6   r!   r*   r»   rú   r%   r&   r'   rJ   r;   ÚreshapeÚextentrf   )rL   ÚnewshapeÚkwsÚclsÚnewarrÚextentss         r   r  zDeviceNDArray.reshapeI  sì   € õ ˆx‰=Œ=˜AÒÐ¥*¨X°a¬[½5Å$¸-Ñ"HÔ"HÐØ ”{ˆHå�4‰jŒjˆØ�t”zÒ!Ð!à�3˜TœZ°´Ø!œZ°$´-ðAñ Aô Að Að .˜$œ+Ô-¨xÐ?¸3Ð?Ð?‰ˆ�à�t”{Ô)Ð*Ò*Ð*Ø�3˜Vœ\°6´>Ø!œZ°$´-ðAñ Aô Að Aõ &Ð&BÑCÔCÐCr   rq   r   c                 ó  — |                       |¦  «        }t          | ¦  «        }| j                             |¬¦  «        \  }}|| j        j        gk    r$ ||j        |j        | j        | j        |¬¦  «        S t          d¦  «        ‚)z¹
        Flattens a contiguous array without changing its contents, similar to
        :meth:`numpy.ndarray.ravel`. If the array is not contiguous, raises an
        exception.
        )r~   ræ   r  )
rm   rú   r;   Úravelr  r%   r&   r'   rJ   rf   )rL   r~   rK   r"  r#  r$  s         r   r&  zDeviceNDArray.ravelc  s�   € ð ×%Ò% fÑ-Ô-ˆÝ�4‰jŒjˆØœ+×+Ò+°%Ð+Ñ8Ô8‰ˆ�à�t”{Ô)Ð*Ò*Ð*Ø�3˜Vœ\°6´>Ø!œZ°$´-Ø$ð&ñ &ô &ð &õ
 &Ð&BÑCÔCÐCr   c                 ó,   — |                       |¦  «        S r   rÖ   rØ   s     r   rÚ   zDeviceNDArray.__getitem__u  rÛ   r   c                 ó.   — |                       ||¦  «        S rÝ   rÖ   rÞ   s      r   rß   zDeviceNDArray.getitemy  rà   r   c                 ó’  — |                       |¦  «        }| j                             |¦  «        }t          |                     ¦   «         ¦  «        }t          | ¦  «        }t          |¦  «        dk    r£ | j        j        |d         Ž }|j	        sh| j
        j        �t          | j
        ||¬¦  «        S t          j        d| j
        ¬¦  «        }t          j        ||| j        j        |¬¦  «         |d         S  ||j        |j        | j
        ||¬¦  «        S  | j        j        |j        Ž } ||j        |j        | j
        ||¬¦  «        S )Nr3   r   rœ   râ   rã   ræ   )rm   r;   rÚ   r»   Úiter_contiguous_extentrú   r6   rJ   r¡   Úis_arrayr'   rè   rË   r+   r•   r@   r—   r:   r%   r&   r  )rL   rÙ   rK   Úarrr$  r"  rë   r™   s           r   r×   zDeviceNDArray._do_getitem  sh  € Ø×%Ò% fÑ-Ô-ˆàŒk×%Ò% dÑ+Ô+ˆÝ�s×1Ò1Ñ3Ô3Ñ4Ô4ˆÝ�4‰jŒjˆÝˆw‰<Œ<˜1ÒÐØ(�d”mÔ(¨'°!¬*Ð5ˆGà”<ð Nà”:Ô#Ð/Ý'¨d¬jÀØ18ð:ñ :ô :ð :õ !œh q°´
Ð;Ñ;Ô;�GÝÔ*¨w¸GØ04´Ô0DØ28ð:ñ :ô :ð :ð ˜q”zÐ!à�s ¤°C´KØ!%¤°gÀfðNñ Nô Nð Nð )�d”mÔ(¨#¬*Ð5ˆGØ�3˜SœY°´Ø!œZ°'À&ðJñ Jô Jð Jr   c                 ó.   — |                       ||¦  «        S r   rí   rï   s      r   rñ   zDeviceNDArray.__setitem__œ  rò   r   c                 ó2   — |                       |||¬¦  «        S rô   rí   rõ   s       r   rö   zDeviceNDArray.setitem   r÷   r   c                 ó  — |                       |¦  «        }| }|r't          j        ¦   «         }|                     ¦   «         }| j                             |¦  «        } | j        j        |j        Ž }t          |t          j        ¦  «        rd}d}	n|j        }|j        }	 t          | ¦  «        ||	| j        ||¬¦  «        }
t!          ||d¬¦  «        \  }}|j        |
j        k    r t%          d|j        ›d|
j        ›d�¦  «        ‚t'          j        |
j        t&          j        ¬¦  «        }|j        ||
j        |j        z
  d …<    |j        |Ž }t/          t1          |
j        |j        ¦  «        ¦  «        D ])\  }\  }}|d	k    r||k    rt%          d
|||fz  ¦  «        ‚Œ*t3          j        t6          j        |
j        d	¦  «        } t;          |
j        ¦  «                             ||¬¦  «        |
|¦  «         |r|                     ¦   «          d S d S )Nr   ræ   T)rK   Úuser_explicitzCan't assign z-D array to z-D selfrâ   r3   zCCan't copy sequence with size %d to array axis %d with dimension %drl   ) rm   r   rC   rù   r;   rÚ   rJ   r¡   r  r!   r   ÚElementr%   r&   rú   r'   rû   r7   r/   r+   Úonesr	  r  Ú	enumerateÚzipr<   r=   r>   r?   r  Úforallrü   )rL   rð   rU   rK   rý   rþ   r,  rë   r%   r&   rÿ   r   r¸   Ú	rhs_shaper¥   ÚlÚrr  s                     r   rî   zDeviceNDArray._do_setitem¦  s?  € à×%Ò% fÑ-Ô-ˆð
 !�jˆØð 	.ÝÔ%Ñ'Ô'ˆCØ×+Ò+Ñ-Ô-ˆFð Œk×%Ò% cÑ*Ô*ˆØ$�$”-Ô$ c¤jÐ1ˆå�c�:Ô-Ñ.Ô.ð 	"àˆEØˆGˆGà”IˆEØ”kˆGà�d�4‰jŒjØØØ”*ØØðñ ô ˆõ ˜U¨6ÀÐFÑFÔF‰ˆˆQØŒ8�c”hÒÐÝ�*Ø”��Ø”��ðñ ô ð õ ”G˜CœH­B¬HÐ5Ñ5Ô5ˆ	à*-¬)ˆ	�#”(˜SœXÑ%Ð&Ð&Ñ'ØˆcŒk˜9Ð%ˆÝ"¥3 s¤y°#´)Ñ#<Ô#<Ñ=Ô=ð 	Kð 	K‰IˆA‰v��1Ø�AŠvˆv˜!˜qš&˜&Ý ð "=ØABÀAÀq¸zñ"Jñ Kô Kð Køõ
 Ô%¥h¤l°C´I¸qÑAÔAˆ
ØB��s”xÑ Ô ×'Ò'¨
¸6Ð'ÑBÔBÀ3ÈÑLÔLÐLØð 	!Ø×ÒÑ Ô Ð Ð Ð ð	!ð 	!r   r   )rq   r   rÁ   )rÃ   rÄ   rÅ   rÆ   r  rÈ   ru   r¼   r  r  r  r&  r   rÉ   rÚ   rß   r×   rñ   rö   rî   r   r   r   r¢   r¢   #  sV  € € € € € ðð ð'ð 'ð 'ð ð'ð 'ñ „Xð'ð'ð 'ð 'ð3ð 3ð 3ð 3ðð ð ðDð Dð Dð4Dð Dð Dð Dð$ Ôð&ð &ñ Ôð&ð Ôð.ð .ð .ñ Ôð.ð
Jð Jð Jð Jð: Ôð,ð ,ñ Ôð,ð Ôð;ð ;ð ;ñ Ôð;ð
5!ð 5!ð 5!ð 5!ð 5!ð 5!r   r¢   c                   ó0   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ ZdS )r°   a"  
    An IPC array handle that can be serialized and transfer to another process
    in the same machine for share a GPU allocation.

    On the destination process, use the *.open()* method to creates a new
    *DeviceNDArray* object that shares the allocation from the original process.
    To release the resources, call the *.close()* method.  After that, the
    destination can no longer use the shared array object.  (Note: the
    underlying weakref to the resource is now dead.)

    This object implements the context-manager interface that calls the
    *.open()* and *.close()* method automatically::

        with the_ipc_array_handle as ipc_array:
            # use ipc_array here as a normal gpu array object
            some_code(ipc_array)
        # ipc_array is dead at this point
    c                 ó"   — || _         || _        d S r   )Ú_array_descÚ_ipc_handle)rL   r¬   r­   s      r   rN   zIpcArrayHandle.__init__ñ  s   € Ø%ˆÔØ%ˆÔÐÐr   c                 ó~   — | j                              t          j        ¦   «         ¦  «        }t	          dd|i| j        ¤ŽS )z˜
        Returns a new *DeviceNDArray* that shares the allocation from the
        original process.  Must not be used on the original process.
        rJ   r   )r<  Úopenr   rC   r¢   r;  )rL   Údptrs     r   r>  zIpcArrayHandle.openõ  s?   € ð
 Ô×$Ò$¥WÔ%8Ñ%:Ô%:Ñ;Ô;ˆÝÐ?Ð? dÐ?¨dÔ.>Ð?Ð?Ð?r   c                 ó8   — | j                              ¦   «          dS )z5
        Closes the IPC handle to the array.
        N)r<  Úclosera   s    r   rA  zIpcArrayHandle.closeý  s   € ð 	Ô×ÒÑ Ô Ð Ð Ð r   c                 ó*   — |                       ¦   «         S r   )r>  ra   s    r   Ú	__enter__zIpcArrayHandle.__enter__  s   € Ø�yŠy‰{Œ{Ðr   c                 ó.   — |                       ¦   «          d S r   )rA  )rL   rú   rU   Ú	tracebacks       r   Ú__exit__zIpcArrayHandle.__exit__  s   € Ø�
Š
‰Œˆˆˆr   N)	rÃ   rÄ   rÅ   rÆ   rN   r>  rA  rC  rF  r   r   r   r°   r°   Þ  sl   € € € € € ðð ð$&ð &ð &ð@ð @ð @ð!ð !ð !ðð ð ðð ð ð ð r   r°   c                   ó   — e Zd ZdZdd„ZdS )ÚMappedNDArrayz4
    A host array that uses CUDA mapped memory.
    r   c                 ó"   — || _         || _        d S r   ©rJ   rK   ©rL   rJ   rK   s      r   Údevice_setupzMappedNDArray.device_setup  ó   € Ø ˆŒØˆŒˆˆr   NrÁ   ©rÃ   rÄ   rÅ   rÆ   rL  r   r   r   rH  rH  
  ó2   € € € € € ðð ðð ð ð ð ð r   rH  c                   ó   — e Zd ZdZdd„ZdS )ÚManagedNDArrayz5
    A host array that uses CUDA managed memory.
    r   c                 ó"   — || _         || _        d S r   rJ  rK  s      r   rL  zManagedNDArray.device_setup  rM  r   NrÁ   rN  r   r   r   rQ  rQ    rO  r   rQ  c                 óH   — t          | j        | j        | j        ||¬¦  «        S )z/Create a DeviceNDArray object that is like ary.©rK   rJ   )r¢   r%   r&   r'   )r‡   rK   rJ   s      r   Úfrom_array_likerU    s*   € å˜œ C¤K°´À6Ø"*ð,ñ ,ô ,ð ,r   c                 ó0   — t          | j        ||¬¦  «        S )z.Create a DeviceRecord object that is like rec.rT  )rË   r'   )ÚrecrK   rJ   s      r   Úfrom_record_likerX  $  s   € å˜œ	¨&¸8ÐDÑDÔDÐDr   c                 ó¸   — | j         r| j        s| S g }| j         D ],}|                     |dk    rdnt          d¦  «        ¦  «         Œ-| t	          |¦  «                 S )aG  
    Extract the repeated core of a broadcast array.

    Broadcast arrays are by definition non-contiguous due to repeated
    dimensions, i.e., dimensions with stride 0. In order to ascertain memory
    contiguity and copy the underlying data from such arrays, we must create
    a view without the repeated dimensions.

    r   N)r&   r(   ÚappendÚslicer*   )r‡   Ú
core_indexÚstrides      r   r�   r�   )  sn   € ð Œ;ð ˜cœhð Øˆ
Ø€JØ”+ð =ð =ˆØ×Ò˜v¨š{˜{˜!˜!µ°d±´Ñ<Ô<Ð<Ð<Ø�u�ZÑ Ô Ô!Ð!r   c                 óÆ   — | j         j        }t          t          | j        ¦  «        t          | j        ¦  «        ¦  «        D ]\  }}|dk    r|dk    r||k    r dS ||z  }Œ dS )zÓ
    Returns True iff `ary` is C-style contiguous while ignoring
    broadcasted and 1-sized dimensions.
    As opposed to array_core(), it does not call require_context(),
    which can be quite expensive.
    r3   r   FT)r'   r:   r4  Úreversedr%   r&   )r‡   r(   r%   r]  s       r   rV   rV   ;  so   € ð Œ9Ô€DÝ�X c¤iÑ0Ô0µ(¸3¼;Ñ2GÔ2GÑHÔHð ð ‰ˆˆvØ�1Š9ˆ9˜ 1š˜Ø�vŠ~ˆ~Ø�u�uØ�E‰MˆDøØˆ4r   z™Array contains non-contiguous buffer and cannot be transferred as a single memory region. Please ensure contiguous buffer with numpy .ascontiguousarray()c                 ó„   — t          | ¦  «        }|j        d         s!|j        d         st          t          ¦  «        ‚d S d S )Nrp   rr   )r�   ru   r/   Úerrmsg_contiguous_buffer)r‡   Úcores     r   r€   r€   Q  sM   € Ý�c‰?Œ?€DØŒ:�nÔ%ð 3¨d¬j¸Ô.Hð 3ÝÕ1Ñ2Ô2Ð2ð3ð 3ð 3ð 3r   TFc                 ó|  — t          j        | ¦  «        r| dfS t          | d¦  «        r!t          j                             | ¦  «        dfS t          | t          j        ¦  «        rt          | |¬¦  «        }nDt          j
        | t          dk     rdndd¬¦  «        } t          | ¦  «         t          | |¬¦  «        }|r~t          j        r[t          j        sO|sMt          | t"          ¦  «        s8t          | t          j        ¦  «        rd}t'          t)          |¦  «        ¦  «         |                     | |¬¦  «         |dfS )	zº
    Create a DeviceRecord or DeviceArray like obj and optionally copy data from
    host to device. If obj already represents device memory, it is returned and
    no copy is made.
    FrY   rl   r|   NT)r[   r   zGHost array used in CUDA kernel will incur copy overhead to/from device.)r@   r‚   r   r  r  Úas_cuda_arrayr!   r+   ÚvoidrX  r…   r   r€   rU  r	   ÚCUDA_WARN_ON_IMPLICIT_COPYÚDISABLE_PERFORMANCE_WARNINGSr¢   r˜   r   r   rŠ   )r   rK   r[   r0  Údevobjrj   s         r   rû   rû   W  sY  € õ Ô Ñ$Ô$ð !Ø�EˆzÐÝ	�Ð0Ñ	1Ô	1ð ÝŒz×'Ò'¨Ñ,Ô,¨eÐ3Ð3å�c�2œ7Ñ#Ô#ð 	9Ý% c°&Ð9Ñ9Ô9ˆFˆFõ ”(ØÝ+¨fÒ4Ð4�U�U¸$Øðñ ô ˆCõ ˜cÑ"Ô"Ð"Ý$ S°Ð8Ñ8Ô8ˆFØð 	6åÔ1ð7åÔ;ð7ð
 &ð7å# C­Ñ7Ô7ð7õ $ C­¬Ñ4Ô4ð7ð
;�CåÕ0°Ñ5Ô5Ñ6Ô6Ð6Ø×!Ò! #¨fÐ!Ñ5Ô5Ð5Ø�tˆ|Ðr   c                 ó‚  — |                       ¦   «         |                      ¦   «         }}| j        |j        k    rt          d| j        ›d|j        ›�¦  «        ‚|j        |j        k    rt	          d| j        ›d|j        ›�¦  «        ‚| j        r/|j        |j        k    r!t	          d| j        ›d|j        ›�¦  «        ‚d S d S )Nzincompatible dtype: z vs. zincompatible shape: zincompatible strides: )r¶   r'   Ú	TypeErrorr%   r/   r(   r&   )Úary1Úary2Úary1sqÚary2sqs       r   rƒ   rƒ   �  sÛ   € Ø—\’\‘^”^ T§\¢\¡^¤^ˆF€FØ„z�T”ZÒÐÝˆiØœ˜˜ T¤Z Zð1ñ 2ô 2ð 	2à„|�v”|Ò#Ð#ÝˆjØœ*˜*˜* d¤j jð2ñ 3ô 3ð 	3ð „yð 7�V”^ v¤~Ò5Ð5ÝˆjØœ,˜,˜,¨¬¨ð6ñ 7ô 7ð 	7ð7ð 7Ð5Ð5r   r�   )r   TF)7rÆ   r�   r<   r>   r[   Úctypesr   Únumpyr+   r  r   Únumba.cuda.cudadrvr   r   r   r@   Ú
numba.corer   r	   Únumba.np.unsafe.ndarrayr
   Únumba.np.numpy_supportr   Únumba.npr   Únumba.cuda.api_utilr   Únumba.core.errorsr   Úwarningsr   r   r   r    r   r-   r)   ÚDeviceArrayr1   rË   r  r¢   Úobjectr°   r˜   rH  rQ  rU  rX  r�   rV   ra  r€   rû   rƒ   r   r   r   ú<module>r{     st  ððð ð €€€Ø Ð Ð Ð Ø €€€Ø €€€Ø Ð Ð Ð Ð Ð à Ð Ð Ð à €€€Ø Ð Ð Ð Ð Ð Ø 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ø 0Ð 0Ð 0Ð 0Ð 0Ð 0Ø $Ð $Ð $Ð $Ð $Ð $Ð $Ð $Ø 2Ð 2Ð 2Ð 2Ð 2Ð 2Ø 0Ð 0Ð 0Ð 0Ð 0Ð 0Ø "Ð "Ð "Ð "Ð "Ð "Ø ;Ð ;Ð ;Ð ;Ð ;Ð ;Ø 5Ð 5Ð 5Ð 5Ð 5Ð 5Ø Ð Ð Ð Ð Ð ðØ/��˜	 ;Ñ/Ô/°Ñ5Ô5€I€IøØð ð ð ðð ð ð ð ðøøøð3ð 3ð 3ð
ð ð ð ;ð ;ð ;ðO/ð O/ð O/ð O/ð O/˜Ô0ñ O/ô O/ð O/ðd
d!ð d!ð d!ð d!ð d!Ð$ñ d!ô d!ð d!ðN ð(ð (ñ „ð(ðVx!ð x!ð x!ð x!ð x!Ð%ñ x!ô x!ð x!ðv)ð )ð )ð )ð )�Vñ )ô )ð )ðXð ð ð ð Ð% r¤zñ ô ð ðð ð ð ð Ð&¨¬
ñ ô ð ð,ð ,ð ,ð ,ðEð Eð Eð Eð
"ð "ð "ð$ð ð ð 3Ð ð3ð 3ð 3ð'ð 'ð 'ð 'ðT7ð 7ð 7ð 7ð 7s   Á"A8 Á8BÂB