Skip to content

Commit

Permalink
reference instead of value for matrix in _blockwise-helper
Browse files Browse the repository at this point in the history
  • Loading branch information
lettis committed Dec 9, 2015
1 parent a4c672d commit ad6882c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ namespace FastPCA {
// helper function to accumulate block data
void
_blockwise(DataFileReader<double>& ifile
, std::function<void(Matrix<double>)> acc) {
, std::function<void(Matrix<double>&)> acc) {
Matrix<double> m = std::move(ifile.next_block());
while (m.n_rows() > 0) {
acc(m);
Expand Down Expand Up @@ -220,7 +220,7 @@ namespace FastPCA {
{
DataFileReader<double> input_file(filename, max_chunk_size);
_blockwise(input_file
, [&hists,binwidth](Matrix<double> m) {
, [&hists,binwidth](Matrix<double>& m) {
std::size_t i, j, i_bin;
std::size_t n_rows = m.n_rows();
std::size_t n_cols = m.n_cols();
Expand Down Expand Up @@ -265,7 +265,7 @@ namespace FastPCA {
{
DataFileReader<double> input_file(filename, max_chunk_size);
_blockwise(input_file
, [&n_jumps,&candidates,n_cols] (Matrix<double> m) {
, [&n_jumps,&candidates,n_cols] (Matrix<double>& m) {
std::size_t j;
std::size_t ic;
#pragma omp parallel for default(none)\
Expand Down

0 comments on commit ad6882c

Please sign in to comment.