cuda.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:npstreams 作者: LaurentRDC 项目源码 文件源码
def csum(arrays, dtype = None, ignore_nan = False):
    """ 
    CUDA-enabled sum of stream of arrays. Arrays are summed along 
    the streaming axis for performance reasons. 

    Parameters
    ----------
    arrays : iterable
        Arrays to be summed. 
    ignore_nan : bool, optional
        If True, NaNs are ignored. Default is propagation of NaNs.

    Returns
    -------
    cuda_sum : ndarray

    See Also
    --------
    isum : streaming sum of array elements, possibly along different axes
    """
    return cuda_inplace_reduce(arrays, operator = iadd, dtype = dtype, 
                               ignore_nan = ignore_nan, identity = 0)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号