crossprod: Matrix Multiplication

Description Usage Arguments Value Communication Examples

Description

Conceptually, this computes t(x) %*% x for a shaq x.

Usage

1
2
3
4
5
## S4 method for signature 'shaq'
crossprod(x, y = NULL)

## S4 method for signature 'tshaq'
tcrossprod(x, y = NULL)

Arguments

x

A shaq.

y

A shaq or NULL.

Value

A regular matrix.

Communication

The operation consists of a local crossproduct, followed by an allreduce() call, quadratic on the number of columns.

For crossprod(), if the matrix distribution is poorly balanced (specifically, if any rank has fewer rows than columns), then an inefficient method is used. Similarly for tcrossprod() if the number of local rows is greater than the number of local columns.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
library(kazaam)
x = ranshaq(runif, 10, 3)

cp = crossprod(x)
comm.print(cp)

finalize()

## End(Not run)

RBigData/kazaam documentation built on Nov. 9, 2021, 9:09 a.m.