def exp1(z_gpu):

    if z_gpu.dtype == np.complex64:
        args = 'pycuda::complex<float> *z, pycuda::complex<float> *e' 
    elif z_gpu.dtype == np.complex128:
        args = 'pycuda::complex<double> *z, pycuda::complex<double> *e' 
    else:
        raise ValueError('unsupported type')
    op = 'e[i] = exp1(z[i])'
    
    try:
        func = exp1.cache[z_gpu.dtype]
    except KeyError:
        func = elementwise.ElementwiseKernel(args, op,
                                 options=["-I", install_headers],
                                 preamble='#include "cuSpecialFuncs.h"')
        exp1.cache[z_gpu.dtype] = func

    e_gpu = gpuarray.empty_like(z_gpu)
    func(z_gpu, e_gpu)

    return e_gpu
Exponential integral with `n = 1` of complex arguments.
dataset/ETHPy150Open lebedov/scikit-cuda/skcuda/special.py/exp1