#NEWLINE# @ memoize ( for_each_device = True ) #NEWLINE# def reduce( in_params , out_params , map_expr , reduce_expr , post_map_expr , identity , name , **kwargs ) : #NEWLINE# #INDENT# 'Creates a global reduction kernel function.\n\n    This function uses :func:`~chainer.cuda.memoize` to cache the resulting\n    kernel object, i.e. the resulting kernel object is cached for each argument\n    combination and CUDA device.\n\n    The arguments are the same as those for\n    :class:`cupy.ReductionKernel`, except that the ``name`` argument is\n    mandatory.\n\n    ' #NEWLINE# check_cuda_available ( ) #NEWLINE# return cupy . ReductionKernel ( in_params , out_params , map_expr , reduce_expr , post_map_expr , identity , name , ** kwargs )