Initializes a multiplication cycle for new set of C-blocks.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_mm_sched_type), | intent(inout) | :: | this | |||
type(dbcsr_work_type), | POINTER | :: | product_wm | |||
integer, | optional | :: | nlayers | |||
logical, | intent(in) | :: | keep_product_data |
SUBROUTINE dbcsr_mm_sched_init(this, product_wm, nlayers, keep_product_data)
!! Initializes a multiplication cycle for new set of C-blocks.
TYPE(dbcsr_mm_sched_type), INTENT(INOUT) :: this
TYPE(dbcsr_work_type), POINTER :: product_wm
INTEGER, OPTIONAL :: nlayers
LOGICAL, INTENT(IN) :: keep_product_data
CHARACTER(len=*), PARAMETER :: routineN = 'dbcsr_mm_sched_init'
INTEGER :: handle
CALL timeset(routineN, handle)
this%keep_product_data = keep_product_data
this%product_wm => product_wm
! Clearing the product_wm takes too long, we gonna do it later and
! return now to allow for MPI to progress.
! We just have to remember its datasize, in case it already contains data.
this%product_wm_orig_datasize = this%product_wm%datasize
CALL dbcsr_mm_hostdrv_init(this%hostdrv, product_wm)
IF (has_acc) &
CALL dbcsr_mm_accdrv_init(this%accdrv, product_wm, nlayers, keep_product_data)
CALL timestop(handle)
END SUBROUTINE dbcsr_mm_sched_init