Commit 1c061ca2 authored by Andreas Marek's avatar Andreas Marek
Browse files

Merge OpenMP regions in one preprocessor if

parent 160a2603
...@@ -1225,6 +1225,7 @@ ...@@ -1225,6 +1225,7 @@
!Code for Algorithm 4 !Code for Algorithm 4
! n_way is actually a branch for the number of OpenMP threads
n_way = 1 n_way = 1
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
#if REALCASE == 1 #if REALCASE == 1
...@@ -1281,10 +1282,8 @@ ...@@ -1281,10 +1282,8 @@
!This algorithm chosen because in this algoirhtm, the loop around the dgemm calls !This algorithm chosen because in this algoirhtm, the loop around the dgemm calls
!is easily parallelized, and regardless of choise of algorithm, !is easily parallelized, and regardless of choise of algorithm,
!the startup cost for parallelizing the dgemms inside the loop is too great !the startup cost for parallelizing the dgemms inside the loop is too great
#ifdef WITH_OPENMP #ifdef REALCASE == 1
#if REALCASE == 1
!$omp do schedule(static,1) !$omp do schedule(static,1)
#endif
#endif #endif
do i=0,(istep*nbw-1)/tile_size do i=0,(istep*nbw-1)/tile_size
lcs = i*l_cols_tile+1 ! local column start lcs = i*l_cols_tile+1 ! local column start
...@@ -1322,13 +1321,15 @@ ...@@ -1322,13 +1321,15 @@
enddo enddo
endif ! l_cols>0 .and. l_rows>0 endif ! l_cols>0 .and. l_rows>0
else ! n_way > 1 else ! n_way > 1
#endif /* WITH_OPENMP */
#if REALCASE == 1 #if REALCASE == 1
umcCPU(1:l_cols,1:n_cols) = CONST_0_0 umcCPU(1:l_cols,1:n_cols) = CONST_0_0
vmrCPU(1:l_rows,n_cols+1:2*n_cols) = CONST_0_0 vmrCPU(1:l_rows,n_cols+1:2*n_cols) = CONST_0_0
#endif #endif
#if COMPLEXCASE == 1 #if COMPLEXCASE == 1
umcCPU(1:l_cols,1:n_cols) = CONST_COMPLEX_0_0 umcCPU(1:l_cols,1:n_cols) = CONST_COMPLEX_0_0
vmrCPU(1:l_rows,n_cols+1:2*n_cols) = CONST_COMPLEX_0_0 vmrCPU(1:l_rows,n_cols+1:2*n_cols) = CONST_COMPLEX_0_0
#endif #endif
if (l_cols>0 .and. l_rows>0) then if (l_cols>0 .and. l_rows>0) then
...@@ -1357,10 +1358,11 @@ ...@@ -1357,10 +1358,11 @@
call obj%timer%stop("blas") call obj%timer%stop("blas")
enddo enddo
endif endif
endif ! n_way > 1
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
endif ! n_way > 1
#if REALCASE == 1 #if REALCASE == 1
!$omp end parallel !$omp end parallel
#endif #endif
#endif #endif
endif ! do not useGPU version endif ! do not useGPU version
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment