on-internet
← Community

Tbb based row sum of an armadillo matrix

Stack Overflow ·

Following the tbb example for parallel_reduce here with a basic datatypes, I wanted to try and implement a tbb version of a row sum of an Armadillo matrix. (I realize the use of arma::sum for this purpose, but this was an attempt at getting to know tbb, Armadillo and how they work together a bit better. ) The following code was aimed to loop over columns of a matrix X, and add the column values to a running total vector. It compiles fine but crashes at run time. I am wondering where I am going wrong. Is the X.col(j) use is incorrect? Thank you! arma::vec parallelRowsumTBB_withArma(arma::mat X)

Comments

Sign in or sign up to comment and upvote.

No comments yet.