diff options
Diffstat (limited to 'include/phat')
-rw-r--r-- | include/phat/boundary_matrix.h | 1 | ||||
-rw-r--r-- | include/phat/helpers/dualize.h | 10 |
2 files changed, 7 insertions, 4 deletions
diff --git a/include/phat/boundary_matrix.h b/include/phat/boundary_matrix.h index 7be14d8..1bdee61 100644 --- a/include/phat/boundary_matrix.h +++ b/include/phat/boundary_matrix.h @@ -176,6 +176,7 @@ namespace phat { const index nr_of_columns = (index)input_matrix.size();
this->set_num_cols( nr_of_columns );
column temp_col;
+ #pragma omp parallel for private( temp_col )
for( index cur_col = 0; cur_col < nr_of_columns; cur_col++ ) {
this->set_dim( cur_col, (dimension)input_dims[ cur_col ] );
diff --git a/include/phat/helpers/dualize.h b/include/phat/helpers/dualize.h index e3ae9ed..3ffedf8 100644 --- a/include/phat/helpers/dualize.h +++ b/include/phat/helpers/dualize.h @@ -40,13 +40,13 @@ namespace phat { for( index cur_col = 0; cur_col < nr_of_columns; cur_col++ ) {
boundary_matrix.get_col( cur_col, temp_col );
for( index idx = 0; idx < (index)temp_col.size(); idx++)
- dual_sizes[ nr_of_columns - 1 - temp_col[ idx ] ]++;
+ dual_sizes[ nr_of_columns - 1 - temp_col[ idx ] ]++;
}
- for( index cur_col = 0; cur_col < nr_of_columns; cur_col++ ) {
+ #pragma omp parallel for
+ for( index cur_col = 0; cur_col < nr_of_columns; cur_col++ )
dual_matrix[cur_col].reserve(dual_sizes[cur_col]);
- }
-
+
for( index cur_col = 0; cur_col < nr_of_columns; cur_col++ ) {
boundary_matrix.get_col( cur_col, temp_col );
for( index idx = 0; idx < (index)temp_col.size(); idx++)
@@ -54,9 +54,11 @@ namespace phat { }
const dimension max_dim = boundary_matrix.get_max_dim();
+ #pragma omp parallel for
for( index cur_col = 0; cur_col < nr_of_columns; cur_col++ )
dual_dims[ nr_of_columns - 1 - cur_col ] = max_dim - boundary_matrix.get_dim( cur_col );
+ #pragma omp parallel for
for( index cur_col = 0; cur_col < nr_of_columns; cur_col++ )
std::reverse( dual_matrix[ cur_col ].begin(), dual_matrix[ cur_col ].end() );
|