Makes sure that the product_wm is cleared.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_mm_sched_type), | intent(inout) | :: | this |
SUBROUTINE ensure_product_wm_cleared(this) !! Makes sure that the product_wm is cleared. TYPE(dbcsr_mm_sched_type), INTENT(INOUT) :: this INTEGER :: allocated_datasize, used_datasize IF (this%product_wm_cleared) RETURN ! The product's data_area could already contain some data. ! ( see: keep_product_data in dbcsr_operations.F ) ! But this data might not occupy all the allocated memory in the data_area. ! Since, we don't want to keep track of uninitialized memory we just zero it now. used_datasize = this%product_wm_orig_datasize allocated_datasize = dbcsr_data_get_size(this%product_wm%data_area) CALL dbcsr_data_clear(this%product_wm%data_area, lb=used_datasize + 1, ub=allocated_datasize) this%product_wm_cleared = .TRUE. END SUBROUTINE ensure_product_wm_cleared