dbcsr_destroy_image_dist Subroutine

private subroutine dbcsr_destroy_image_dist(imgdist)

Destroys a DBCSR distribution for a matrix multiplication based on the right matrix

Arguments

Type IntentOptional Attributes Name
type(dbcsr_imagedistribution_type), intent(inout) :: imgdist

product distribution repetition


Source Code

   SUBROUTINE dbcsr_destroy_image_dist(imgdist)
      !! Destroys a DBCSR distribution for a matrix multiplication based on
      !! the right matrix

      TYPE(dbcsr_imagedistribution_type), INTENT(INOUT)  :: imgdist
         !! product distribution repetition

      INTEGER                                            :: i

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

      CALL array_release(imgdist%row_image)
      CALL array_release(imgdist%col_image)
      CALL dbcsr_distribution_release(imgdist%main)
      !
      CALL array_release(imgdist%vrow_dist)
      CALL array_release(imgdist%vcol_dist)
      !
      IF (imgdist%has_other_vl_rows) THEN
         DO i = LBOUND(imgdist%other_vl_rows, 1), UBOUND(imgdist%other_vl_rows, 1)
            CALL array_release(imgdist%other_vl_rows(i))
         END DO
         DEALLOCATE (imgdist%other_vl_rows)
         imgdist%has_other_vl_rows = .FALSE.
      END IF
      !
      IF (imgdist%has_other_vl_cols) THEN
         DO i = LBOUND(imgdist%other_vl_cols, 1), UBOUND(imgdist%other_vl_cols, 1)
            CALL array_release(imgdist%other_vl_cols(i))
         END DO
         DEALLOCATE (imgdist%other_vl_cols)
         imgdist%has_other_vl_cols = .FALSE.
      END IF
      !
      IF (imgdist%has_global_vrow_map) THEN
         CALL array_release(imgdist%global_vrow_map)
      END IF
      IF (imgdist%has_global_vcol_map) THEN
         CALL array_release(imgdist%global_vcol_map)
      END IF
   END SUBROUTINE dbcsr_destroy_image_dist