def __call__(self, arr, res=None, size=None, init=0, stream=0):
        from numba import cuda

        if arr.ndim != 1:
            raise TypeError("only support 1D array")

        # Avoid computation for zero-length input
        if (size is not None and size == 0) or (arr.size == 0):
            if res is None:
                return init
            else:
                res[0] = init
                return None

        darr, _ = cuda.devicearray.auto_device(arr, stream=stream)
        nbtype = from_dtype(arr.dtype)
        self._precompile_kernels(nbtype)
        self._execute_reduction(darr, size, stream, init=init)

        if res is None:
            return darr[0]
        else:
            view = darr.bind(stream=stream)[:1]
            res.copy_to_device(view, stream=stream)
            return None
Performs a full reduction.
dataset/ETHPy150Open numba/numba/numba/cuda/kernels/reduction.py/Reduce.__call__