dbcsr_acc_get_ndevices Function

public function dbcsr_acc_get_ndevices() result(n)

Get number of accelerator devices

Arguments

None

Return Value integer

number of accelerator devices


Source Code

   FUNCTION dbcsr_acc_get_ndevices() RESULT(n)
      !! Get number of accelerator devices

      INTEGER                                  :: n
         !! number of accelerator devices

#if defined (__DBCSR_ACC)
      INTEGER                                  :: istat
#endif

      n = 0
#if defined (__DBCSR_ACC)
      istat = acc_get_ndevices_cu(n)
      IF (istat /= 0) &
         DBCSR_ABORT("dbcsr_acc_get_ndevices: failed")
#endif
   END FUNCTION dbcsr_acc_get_ndevices