o
    .i                     @   sr   d Z dZdededefddZdedefdd	Zdedefd
dZdededefddZdededefddZdS )z Math utility functions for vLLM.g_G?abreturnc                 C   s   | |   S )zCeiling division. )r   r   r   r   R/home/ubuntu/veenaModal/venv/lib/python3.10/site-packages/vllm/utils/math_utils.pycdiv
      r   nc                 C   s   | dk rdS d| d   > S )zThe next power of 2 (inclusive)   
bit_lengthr   r   r   r   next_power_of_2      r   c                 C   s   | dkrdS d|   d > S )z#The previous power of 2 (inclusive)    r	   r
   r   r   r   r   prev_power_of_2   r   r   xyc                 C   s   | | d | | S )z(Round up x to the nearest multiple of y.r	   r   r   r   r   r   r   round_up   s   r   c                 C   s   | | | S )z*Round down x to the nearest multiple of y.r   r   r   r   r   
round_down"   r   r   N)__doc__RCP_LN2intr   r   r   r   r   r   r   r   r   <module>   s   