Sets a data pointer.
Assumptions Assumes that no memory will be lost when repointing the pointer in the data area and that the area is initialized.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_data_obj), | intent(inout) | :: | area |
target data area |
||
complex(kind=real_4), | DIMENSION(:, :), POINTER | :: | p |
source data pointer |
SUBROUTINE set_data_p_2d_c (area, p)
!! Sets a data pointer.
!!
!! Assumptions
!! Assumes that no memory will be lost when repointing the
!! pointer in the data area and that the area is initialized.
TYPE(dbcsr_data_obj), INTENT(INOUT) :: area
!! target data area
COMPLEX(kind=real_4), DIMENSION(:, :), POINTER :: p
!! source data pointer
IF (area%d%data_type /= dbcsr_type_complex_4_2d) &
DBCSR_ABORT("set_data_p_2d_c: data-area has wrong type")
area%d%c2_sp => p
END SUBROUTINE set_data_p_2d_c