summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjan.reininghaus <jan.reininghaus@8e3bb3c2-eed4-f18f-5264-0b6c94e6926d>2013-05-08 14:27:14 +0000
committerjan.reininghaus <jan.reininghaus@8e3bb3c2-eed4-f18f-5264-0b6c94e6926d>2013-05-08 14:27:14 +0000
commit590823ec6863426c23f606415d010fd362f9c5c0 (patch)
tree622217fe9e46f678e849075bc84c9c5258ccc693
parent8e20400dada3fd81f4e30b54a5ab33756349dd96 (diff)
new chunk size option available in chunk_reduction.h
git-svn-id: https://phat.googlecode.com/svn/trunk@76 8e3bb3c2-eed4-f18f-5264-0b6c94e6926d
-rw-r--r--include/phat/algorithms/chunk_reduction.h5
1 files changed, 5 insertions, 0 deletions
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<index> 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 );