Deallocates memory
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int_4), | DIMENSION(:, :), POINTER | :: | mem |
memory to allocate |
||
type(dbcsr_memtype_type), | intent(in) | :: | mem_type |
memory type |
SUBROUTINE mem_dealloc_i_2d(mem, mem_type) !! Deallocates memory INTEGER(kind=int_4), DIMENSION(:, :), POINTER :: mem !! memory to allocate TYPE(dbcsr_memtype_type), INTENT(IN) :: mem_type !! memory type CHARACTER(len=*), PARAMETER :: routineN = 'mem_dealloc_i' INTEGER :: error_handle ! --------------------------------------------------------------------------- IF (careful_mod) & CALL timeset(routineN, error_handle) IF (mem_type%acc_hostalloc) THEN DBCSR_ABORT("Accelerator host deallocate not supported for 2D arrays.") !CALL acc_hostmem_deallocate(mem, mem_type%acc_stream) ELSE IF (mem_type%mpi) THEN DBCSR_ABORT("MPI deallocate not supported for 2D arrays.") !CALL mp_deallocate(mem) ELSE DEALLOCATE (mem) END IF IF (careful_mod) & CALL timestop(error_handle) END SUBROUTINE mem_dealloc_i_2d