2015-08-28 15:33:40 +00:00
|
|
|
! { dg-additional-options "-cpp" }
|
|
|
|
! TODO: Have to disable the acc_on_device builtin for we want to test
|
|
|
|
! the libgomp library function? The command line option
|
|
|
|
! '-fno-builtin-acc_on_device' is valid for C/C++/ObjC/ObjC++ but not
|
|
|
|
! for Fortran.
|
|
|
|
|
|
|
|
IMPLICIT NONE
|
|
|
|
INCLUDE "openacc_lib.h"
|
|
|
|
|
|
|
|
!Host.
|
|
|
|
|
2018-12-28 15:30:48 +00:00
|
|
|
IF (.NOT. ACC_ON_DEVICE (ACC_DEVICE_NONE)) STOP 1
|
|
|
|
IF (.NOT. ACC_ON_DEVICE (ACC_DEVICE_HOST)) STOP 2
|
|
|
|
IF (ACC_ON_DEVICE (ACC_DEVICE_NOT_HOST)) STOP 3
|
|
|
|
IF (ACC_ON_DEVICE (ACC_DEVICE_NVIDIA)) STOP 4
|
2015-08-28 15:33:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
!Host via offloading fallback mode.
|
|
|
|
|
|
|
|
!$ACC PARALLEL IF(.FALSE.)
|
2018-12-28 15:30:48 +00:00
|
|
|
IF (.NOT. ACC_ON_DEVICE (ACC_DEVICE_NONE)) STOP 5
|
|
|
|
IF (.NOT. ACC_ON_DEVICE (ACC_DEVICE_HOST)) STOP 6
|
|
|
|
IF (ACC_ON_DEVICE (ACC_DEVICE_NOT_HOST)) STOP 7
|
|
|
|
IF (ACC_ON_DEVICE (ACC_DEVICE_NVIDIA)) STOP 8
|
2015-08-28 15:33:40 +00:00
|
|
|
!$ACC END PARALLEL
|
|
|
|
|
|
|
|
|
|
|
|
#if !ACC_DEVICE_TYPE_host
|
|
|
|
|
|
|
|
! Offloaded.
|
|
|
|
|
|
|
|
!$ACC PARALLEL
|
2018-12-28 15:30:48 +00:00
|
|
|
IF (ACC_ON_DEVICE (ACC_DEVICE_NONE)) STOP 9
|
|
|
|
IF (ACC_ON_DEVICE (ACC_DEVICE_HOST)) STOP 10
|
|
|
|
IF (.NOT. ACC_ON_DEVICE (ACC_DEVICE_NOT_HOST)) STOP 11
|
2015-08-28 15:33:40 +00:00
|
|
|
#if ACC_DEVICE_TYPE_nvidia
|
2018-12-28 15:30:48 +00:00
|
|
|
IF (.NOT. ACC_ON_DEVICE (ACC_DEVICE_NVIDIA)) STOP 12
|
2015-08-28 15:33:40 +00:00
|
|
|
#else
|
2018-12-28 15:30:48 +00:00
|
|
|
IF (ACC_ON_DEVICE (ACC_DEVICE_NVIDIA)) STOP 13
|
2015-08-28 15:33:40 +00:00
|
|
|
#endif
|
|
|
|
!$ACC END PARALLEL
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
END
|