
    .`i                     j    d Z dZdededefdZdedefdZdedefdZd	ed
edefdZd	ed
edefdZdS )z Math utility functions for vLLM.g_G?abreturnc                     | | z   S )zCeiling division. )r   r   s     i/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/vllm/utils/math_utils.pycdivr   
   s    1"W:    nc                 F    | dk     rdS d| dz
                                   z  S )zThe next power of 2 (inclusive)   
bit_lengthr
   s    r   next_power_of_2r      s+    1uuqQ""$$$$r	   c                 F    | dk    rdS d|                                  dz
  z  S )z#The previous power of 2 (inclusive)    r   r   r   s    r   prev_power_of_2r      s(    Avvq!#$$r	   xyc                     | |z   dz
  |z  |z  S )z(Round up x to the nearest multiple of y.r   r   r   r   s     r   round_upr      s    UQY1!!r	   c                     | |z  |z  S )z*Round down x to the nearest multiple of y.r   r   s     r   
round_downr   "   s    Fa<r	   N)__doc__RCP_LN2intr   r   r   r   r   r   r	   r   <module>r      s    ' & C C C    
%s %s % % % %%s %s % % % %" " " " " " "
# # #      r	   