From 590823ec6863426c23f606415d010fd362f9c5c0 Mon Sep 17 00:00:00 2001 From: "jan.reininghaus" Date: Wed, 8 May 2013 14:27:14 +0000 Subject: new chunk size option available in chunk_reduction.h git-svn-id: https://phat.googlecode.com/svn/trunk@76 8e3bb3c2-eed4-f18f-5264-0b6c94e6926d --- include/phat/algorithms/chunk_reduction.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/phat/algorithms/chunk_reduction.h b/include/phat/algorithms/chunk_reduction.h index ebba266..5c927d7 100644 --- a/include/phat/algorithms/chunk_reduction.h +++ b/include/phat/algorithms/chunk_reduction.h @@ -107,7 +107,12 @@ namespace phat { std::vector temp_chunk_boundaries; const index nr_columns = boundary_matrix.get_num_cols(); + // size of chuks = sqrt(N) const index chunk_size = (index) sqrt( (float)nr_columns ); + + // size of chunks = N / num_threads + //const index chunk_size = nr_columns / omp_get_max_threads(); + for ( index cur_col = 0; cur_col < nr_columns; cur_col++ ) if( cur_col % chunk_size == 0 ) temp_chunk_boundaries.push_back( cur_col ); -- cgit v1.2.3