acc_devmem_info Subroutine

public subroutine acc_devmem_info(free, total)

Arguments

Type IntentOptional Attributes Name
integer(kind=int_8), intent(out) :: free
integer(kind=int_8), intent(out) :: total

Source Code

   SUBROUTINE acc_devmem_info(free, total)
      INTEGER(KIND=int_8), INTENT(OUT)         :: free, total
#if defined(__DBCSR_ACC)
      INTEGER(KIND=C_INT)                      :: istat
      INTEGER(KIND=C_SIZE_T)                   :: free_c, total_c

      CALL dbcsr_acc_set_active_device(get_accdrv_active_device_id())
      istat = acc_interface_dev_mem_info(free_c, total_c)
      IF (istat /= 0) &
         DBCSR_ABORT("acc_devmem_info: failed")
      free = free_c
      total = total_c
#else
      free = 0
      total = 0
#endif
   END SUBROUTINE acc_devmem_info