mirror of git://gcc.gnu.org/git/gcc.git
libgomp/openacc.f90 – clean-up public/private attributes
* config/accel/openacc.f90 (module openacc_kinds): Use 'PUBLIC' to mark all symbols as public except for the 'use …, only' imported symbol, which is private. (module openacc): Default to 'PRIVATE' to exclude openacc_internal; mark all symbols from module openacc_kinds as PUBLIC * openacc.f90: Add comment with crossref to that file and openmp_lib.h; fix comment typo. * openacc_lib.h (acc_device_gcn): Add this PARAMETER. From-SVN: r279456
This commit is contained in:
parent
e55cdb1455
commit
0b8499a480
|
@ -1,3 +1,14 @@
|
||||||
|
2019-12-17 Tobias Burnus <tobias@codesourcery.com>
|
||||||
|
|
||||||
|
* config/accel/openacc.f90 (module openacc_kinds): Use 'PUBLIC' to mark
|
||||||
|
all symbols as public except for the 'use …, only' imported symbol,
|
||||||
|
which is private.
|
||||||
|
(module openacc): Default to 'PRIVATE' to exclude openacc_internal; mark
|
||||||
|
all symbols from module openacc_kinds as PUBLIC
|
||||||
|
* openacc.f90: Add comment with crossref to that file and openmp_lib.h;
|
||||||
|
fix comment typo.
|
||||||
|
* openacc_lib.h (acc_device_gcn): Add this PARAMETER.
|
||||||
|
|
||||||
2019-12-13 Julian Brown <julian@codesourcery.com>
|
2019-12-13 Julian Brown <julian@codesourcery.com>
|
||||||
|
|
||||||
PR libgomp/92881
|
PR libgomp/92881
|
||||||
|
|
|
@ -36,14 +36,13 @@ module openacc_kinds
|
||||||
use iso_fortran_env, only: int32
|
use iso_fortran_env, only: int32
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
|
public
|
||||||
private :: int32
|
private :: int32
|
||||||
public :: acc_device_kind
|
|
||||||
|
! When adding items, also update 'public' setting in 'module openacc' below.
|
||||||
|
|
||||||
integer, parameter :: acc_device_kind = int32
|
integer, parameter :: acc_device_kind = int32
|
||||||
|
|
||||||
public :: acc_device_none, acc_device_default, acc_device_host
|
|
||||||
public :: acc_device_not_host, acc_device_nvidia
|
|
||||||
|
|
||||||
! Keep in sync with include/gomp-constants.h.
|
! Keep in sync with include/gomp-constants.h.
|
||||||
integer (acc_device_kind), parameter :: acc_device_none = 0
|
integer (acc_device_kind), parameter :: acc_device_none = 0
|
||||||
integer (acc_device_kind), parameter :: acc_device_default = 1
|
integer (acc_device_kind), parameter :: acc_device_default = 1
|
||||||
|
@ -53,7 +52,7 @@ module openacc_kinds
|
||||||
integer (acc_device_kind), parameter :: acc_device_nvidia = 5
|
integer (acc_device_kind), parameter :: acc_device_nvidia = 5
|
||||||
integer (acc_device_kind), parameter :: acc_device_gcn = 8
|
integer (acc_device_kind), parameter :: acc_device_gcn = 8
|
||||||
|
|
||||||
end module
|
end module openacc_kinds
|
||||||
|
|
||||||
module openacc_internal
|
module openacc_internal
|
||||||
use openacc_kinds
|
use openacc_kinds
|
||||||
|
@ -75,13 +74,20 @@ module openacc_internal
|
||||||
integer (c_int), value :: d
|
integer (c_int), value :: d
|
||||||
end function
|
end function
|
||||||
end interface
|
end interface
|
||||||
end module
|
end module openacc_internal
|
||||||
|
|
||||||
module openacc
|
module openacc
|
||||||
use openacc_kinds
|
use openacc_kinds
|
||||||
use openacc_internal
|
use openacc_internal
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
! From openacc_kinds
|
||||||
|
public :: acc_device_kind
|
||||||
|
public :: acc_device_none, acc_device_default, acc_device_host
|
||||||
|
public :: acc_device_not_host, acc_device_nvidia, acc_device_gcn
|
||||||
|
|
||||||
public :: acc_on_device
|
public :: acc_on_device
|
||||||
|
|
||||||
interface acc_on_device
|
interface acc_on_device
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
! see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
! see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||||
! <http://www.gnu.org/licenses/>.
|
! <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
! Keep in sync with config/accel/openacc.f90 and openacc_lib.h.
|
||||||
|
|
||||||
module openacc_kinds
|
module openacc_kinds
|
||||||
use iso_fortran_env, only: int32
|
use iso_fortran_env, only: int32
|
||||||
implicit none
|
implicit none
|
||||||
|
@ -34,7 +36,7 @@ module openacc_kinds
|
||||||
public
|
public
|
||||||
private :: int32
|
private :: int32
|
||||||
|
|
||||||
! When adding items, also update 'public' setting in 'module openmp' below.
|
! When adding items, also update 'public' setting in 'module openacc' below.
|
||||||
|
|
||||||
integer, parameter :: acc_device_kind = int32
|
integer, parameter :: acc_device_kind = int32
|
||||||
|
|
||||||
|
@ -52,7 +54,7 @@ module openacc_kinds
|
||||||
! Keep in sync with include/gomp-constants.h.
|
! Keep in sync with include/gomp-constants.h.
|
||||||
integer (acc_handle_kind), parameter :: acc_async_noval = -1
|
integer (acc_handle_kind), parameter :: acc_async_noval = -1
|
||||||
integer (acc_handle_kind), parameter :: acc_async_sync = -2
|
integer (acc_handle_kind), parameter :: acc_async_sync = -2
|
||||||
end module
|
end module openacc_kinds
|
||||||
|
|
||||||
module openacc_internal
|
module openacc_internal
|
||||||
use openacc_kinds
|
use openacc_kinds
|
||||||
|
@ -704,7 +706,7 @@ module openacc_internal
|
||||||
integer (c_int), value :: async
|
integer (c_int), value :: async
|
||||||
end subroutine
|
end subroutine
|
||||||
end interface
|
end interface
|
||||||
end module
|
end module openacc_internal
|
||||||
|
|
||||||
module openacc
|
module openacc
|
||||||
use openacc_kinds
|
use openacc_kinds
|
||||||
|
@ -712,6 +714,7 @@ module openacc
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
! From openacc_kinds
|
! From openacc_kinds
|
||||||
public :: acc_device_kind, acc_handle_kind
|
public :: acc_device_kind, acc_handle_kind
|
||||||
public :: acc_device_none, acc_device_default, acc_device_host
|
public :: acc_device_none, acc_device_default, acc_device_host
|
||||||
|
@ -933,7 +936,7 @@ module openacc
|
||||||
procedure :: acc_update_self_async_array_h
|
procedure :: acc_update_self_async_array_h
|
||||||
end interface
|
end interface
|
||||||
|
|
||||||
end module
|
end module openacc
|
||||||
|
|
||||||
function acc_get_num_devices_h (d)
|
function acc_get_num_devices_h (d)
|
||||||
use openacc_internal, only: acc_get_num_devices_l
|
use openacc_internal, only: acc_get_num_devices_l
|
||||||
|
|
|
@ -32,6 +32,8 @@
|
||||||
! Alternatively, the user can use the module version, which permits
|
! Alternatively, the user can use the module version, which permits
|
||||||
! compilation with -std=f95.
|
! compilation with -std=f95.
|
||||||
|
|
||||||
|
! Keep in sync with openacc.f90 and config/accel/openacc.f90.
|
||||||
|
|
||||||
integer, parameter :: acc_device_kind = 4
|
integer, parameter :: acc_device_kind = 4
|
||||||
|
|
||||||
! Keep in sync with include/gomp-constants.h.
|
! Keep in sync with include/gomp-constants.h.
|
||||||
|
@ -42,6 +44,7 @@
|
||||||
! removed.
|
! removed.
|
||||||
integer (acc_device_kind), parameter :: acc_device_not_host = 4
|
integer (acc_device_kind), parameter :: acc_device_not_host = 4
|
||||||
integer (acc_device_kind), parameter :: acc_device_nvidia = 5
|
integer (acc_device_kind), parameter :: acc_device_nvidia = 5
|
||||||
|
integer (acc_device_kind), parameter :: acc_device_gcn = 8
|
||||||
|
|
||||||
integer, parameter :: acc_handle_kind = 4
|
integer, parameter :: acc_handle_kind = 4
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue