dbcsr_scale_by_vector_c Subroutine

private subroutine dbcsr_scale_by_vector_c(matrix_a, alpha, side)

Interface for matrix scaling by a vector

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix_a
complex(kind=real_4), intent(in), DIMENSION(:), TARGET, CONTIGUOUS :: alpha
character(len=*), intent(in) :: side

Source Code

      SUBROUTINE dbcsr_scale_by_vector_c (matrix_a, alpha, side)
      !! Interface for matrix scaling by a vector
         TYPE(dbcsr_type), INTENT(INOUT)            :: matrix_a
         COMPLEX(kind=real_4), DIMENSION(:), INTENT(IN), TARGET, CONTIGUOUS :: alpha
         CHARACTER(LEN=*), INTENT(IN)              :: side
         COMPLEX(kind=real_4), DIMENSION(:), POINTER, CONTIGUOUS :: tmp_p
         TYPE(dbcsr_data_obj)                      :: enc_alpha_vec

         CALL dbcsr_data_init(enc_alpha_vec)
         CALL dbcsr_data_new(enc_alpha_vec, dbcsr_type_complex_4)
         tmp_p => alpha
         CALL dbcsr_data_set_pointer(enc_alpha_vec, tmp_p)
         CALL dbcsr_scale_by_vector_anytype(matrix_a, enc_alpha_vec, side)
         CALL dbcsr_data_clear_pointer(enc_alpha_vec)
         CALL dbcsr_data_release(enc_alpha_vec)
      END SUBROUTINE dbcsr_scale_by_vector_c