powered by
Increment an FBM
big_increment(X, add, use_lock = FALSE)
Returns nothing (NULL, invisibly).
NULL
An FBM (of type double) to increment.
FBM
A matrix of same dimensions as X. Or a vector of same size.
X
Whether to use locks when incrementing. Default is FALSE. This is useful when incrementing in parallel.
FALSE
X <- FBM(10, 10, init = 0) mat <- matrix(rnorm(100), 10, 10) big_increment(X, mat) all.equal(X[], mat) big_increment(X, mat) all.equal(X[], 2 * mat)
Run the code above in your browser using DataLab