U
    Ph:                     @  s*  d Z ddlmZ ddlmZ ddlmZ ddlmZ eddd\Z	Z
d	d
dddddddddddddddddddddd gZG d!d deZG d"d deeZG d#d deZG d$d deeZG d%d	 d	eZG d&d deeZe Z ZZe Z ZZe Z ZZe Z ZZe Z ZZ e Z! Z"Z#d'S )(zK
Wrapper around NVIDIA Tools Extension for profiling MONAI transformations
    )annotations)RandomizableTrait)	Transform)optional_importztorch._C._nvtxz:NVTX is not installed. Are you sure you have a CUDA build?)
descriptorMarkMarkdMarkDMarkDictRandMark	RandMarkd	RandMarkDRandMarkDictRandRangePopRandRangePopdRandRangePopDRandRangePopDictRandRangePushRandRangePushdRandRangePushDRandRangePushDictRangePop	RangePopd	RangePopDRangePopDict	RangePush
RangePushd
RangePushDRangePushDictc                   @  s(   e Zd ZdZdddddZdd Zd	S )
r   z
    Pushes a range onto a stack of nested range span.
    Stores zero-based depth of the range that is started.

    Args:
        msg: ASCII message to associate with range
    strNonemsgreturnc                 C  s   || _ d | _d S N)r"   depthselfr"    r(   J/home/dell461/cl/sdc2/HISourceFinder-master-l/src/monai/transforms/nvtx.py__init__<   s    zRangePush.__init__c                 C  s   t | j| _|S r$   )_nvtx
rangePushAr"   r%   r'   datar(   r(   r)   __call__@   s    zRangePush.__call__N__name__
__module____qualname____doc__r*   r/   r(   r(   r(   r)   r   3   s   c                   @  s   e Zd ZdZdS )r   z
    Pushes a range onto a stack of nested range span (for randomizable transforms).
    Stores zero-based depth of the range that is started.

    Args:
        msg: ASCII message to associate with range
    Nr1   r2   r3   r4   r(   r(   r(   r)   r   E   s   c                   @  s   e Zd ZdZdd ZdS )r   zt
    Pops a range off of a stack of nested range spans.
    Stores zero-based depth of the range that is ended.
    c                 C  s   t   |S r$   )r+   rangePopr-   r(   r(   r)   r/   U   s    zRangePop.__call__N)r1   r2   r3   r4   r/   r(   r(   r(   r)   r   O   s   c                   @  s   e Zd ZdZdS )r   z
    Pops a range off of a stack of nested range spans (for randomizable transforms).
    Stores zero-based depth of the range that is ended.
    Nr5   r(   r(   r(   r)   r   Z   s   c                   @  s(   e Zd ZdZdddddZdd Zd	S )
r   z
    Mark an instantaneous event that occurred at some point.

    Args:
        msg: ASCII message to associate with the event.
    r   r    r!   c                 C  s
   || _ d S r$   )r"   r&   r(   r(   r)   r*   i   s    zMark.__init__c                 C  s   t | j |S r$   )r+   markAr"   r-   r(   r(   r)   r/   l   s    zMark.__call__Nr0   r(   r(   r(   r)   r   a   s   c                   @  s   e Zd ZdZdS )r   z
    Mark an instantaneous event that occurred at some point (for randomizable transforms).

    Args:
        msg: ASCII message to associate with the event.
    Nr5   r(   r(   r(   r)   r   q   s   N)$r4   
__future__r   monai.transforms.traitsr   monai.transforms.transformr   monai.utilsr   r+   ___all__r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r
   r	   r   r   r   r   r(   r(   r(   r)   <module>   sT   
	