dbcsr_distribution_make_threads Subroutine

public subroutine dbcsr_distribution_make_threads(dist, row_sizes)

Creates a distribution for threads

Arguments

Type IntentOptional Attributes Name
type(dbcsr_distribution_obj), intent(inout), TARGET :: dist

Add thread distribution to this distribution

integer, intent(in), optional, DIMENSION(:), CONTIGUOUS :: row_sizes

row block sizes


Source Code

   SUBROUTINE dbcsr_distribution_make_threads(dist, row_sizes)
      !! Creates a distribution for threads

      TYPE(dbcsr_distribution_obj), INTENT(INOUT), &
         TARGET                                          :: dist
         !! Add thread distribution to this distribution
      INTEGER, DIMENSION(:), INTENT(IN), CONTIGUOUS, OPTIONAL :: row_sizes
         !! row block sizes

      TYPE(dbcsr_distribution_obj), POINTER              :: dist_p

!   ---------------------------------------------------------------------------

      dist_p => dist
!$    IF (.NOT. omp_in_parallel()) THEN
! GCC 10.2 refused to build with DEFAULT(NONE) SHARED(dist_p, row_sizes) here:
!$OMP        PARALLEL DEFAULT(SHARED)
!$       CALL make_threads(dist_p, row_sizes=row_sizes)
!$OMP        END PARALLEL
!$    ELSE
         CALL make_threads(dist_p, row_sizes=row_sizes)
!$OMP        BARRIER
!$    END IF
   END SUBROUTINE dbcsr_distribution_make_threads