spadd_allreduce: Sparse Adder Reduction

Description Usage Arguments Value

View source: R/spadd_allreduce.r

Description

Given a sparse matrix on each process, this computes the sum of all of those matrices. The return will be stored as a sparse matrix, although it is not guaranteed to be sparse.

Usage

1
2
3
4
5
6
7
8
9
spadd_allreduce(x, comm = 0L, type = "double")

spadd_reduce(x, root = 0L, comm = 0L, type = "double")

## S3 method for class 'dgCMatrix'
spadd_allreduce(x, comm = 0L, type = "double")

## S3 method for class 'dgCMatrix'
spadd_reduce(x, root = 0L, comm = 0L, type = "double")

Arguments

x

The input data. Should be a sparse "dgCMatrix" object. The matrix should be the same dimensions across all processes.

comm

MPI communicator number.

type

The type used for the intermediate operations. Should be one of "double" or "float".

root

MPI rank that should receive the return in the non-all version.

Value

If the all version is called or if the calling rank is equal to root, then a sparse "dgCMatrix" object is returned, and otherwise NULL.


RBigData/cop documentation built on March 10, 2021, 8:21 p.m.