o
    X۷i]                     @  sL   d dl mZ d dlmZ dZejdddeddZd	Zejd
ddeddZdS )    )annotations)_corez

template <typename T>
static __device__ T xlogy(T x, T y) {
    if ((x == (T)0.0) && !isnan(y)) {
        return (T)0.0;
    } else {
        return x * log(y);
    }
}


cupy_xlogy))ee->d1out0 = out0_type(xlogy(double(in0), double(in1))))ll->dr   )LL->dr   ff->fdd->dFF->FDD->Dz!out0 = out0_type(xlogy(in0, in1))zCompute ``x*log(y)`` so that the result is 0 if ``x = 0``.

    Args:
        x (cupy.ndarray): input data

    Returns:
        cupy.ndarray: values of ``x * log(y)``

    .. seealso:: :data:`scipy.special.xlogy`

    )preambledocz

template <typename T>
static __device__ T xlog1py(T x, T y) {
    if ((x == (T)0.0) && ~isnan(y)) {
        return (T)0.0;
    } else {
        return x * log1p(y);
    }
}

cupy_xlog1py))r   3out0 = out0_type(xlog1py(double(in0), double(in1))))r   r   )r   r   r	   r
   r   r   z#out0 = out0_type(xlog1py(in0, in1))zCompute ``x*log1p(y)`` so that the result is 0 if ``x = 0``.

    Args:
        x (cupy.ndarray): input data

    Returns:
        cupy.ndarray: values of ``x * log1p(y)``

    .. seealso:: :data:`scipy.special.xlog1py`

    N)	
__future__r   cupyr   xlogy_definitioncreate_ufuncxlogyxlog1py_definitionxlog1py r   r   P/home/ubuntu/vllm_env/lib/python3.10/site-packages/cupyx/scipy/special/_xlogy.py<module>   s$    
