1 !===-- module/cudedevice.f90 -----------------------------------------------===!
3 ! Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 ! See https://llvm.org/LICENSE.txt for license information.
5 ! SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 !===------------------------------------------------------------------------===!
9 ! CUDA Fortran procedures available in device subprogram
14 ! Set PRIVATE by default to explicitly only export what is meant
15 ! to be exported by this MODULE.
18 ! Synchronization Functions
21 attributes(device
) subroutine syncthreads() bind(c
, name
='__syncthreads')
27 attributes(device
) integer function syncthreads_and(value
) bind(c
, name
='__syncthreads_and')
31 public
:: syncthreads_and
34 attributes(device
) integer function syncthreads_count(value
) bind(c
, name
='__syncthreads_count')
38 public
:: syncthreads_count
41 attributes(device
) integer function syncthreads_or(value
) bind(c
, name
='__syncthreads_or')
45 public
:: syncthreads_or
48 attributes(device
) subroutine syncwarp(mask
) bind(c
, name
='__syncwarp')
57 attributes(device
) subroutine threadfence() bind(c
, name
='__threadfence')
63 attributes(device
) subroutine threadfence_block() bind(c
, name
='__threadfence_block')
66 public
:: threadfence_block
69 attributes(device
) subroutine threadfence_system() bind(c
, name
='__threadfence_system')
72 public
:: threadfence_system