Neko  0.8.1
A portable framework for high-order spectral element flow simulations
roctx.F90
Go to the documentation of this file.
1 
2 module roctx
3  use, intrinsic :: iso_c_binding
4  implicit none
5  private
6 
7  integer, parameter :: roctx_max_len = 256
8 
9 #ifdef HAVE_ROCTX
10  interface roctxrangepusha
11  subroutine roctxrangepusha(name) bind(C, name='roctxRangePushA')
12  use iso_c_binding
13  character(kind=c_char) :: name(256)
14  end subroutine roctxrangepusha
15  end interface roctxrangepusha
16 
17  interface roctxrangepop
18  subroutine roctxrangepop() bind(C, name='roctxRangePop')
19  end subroutine roctxrangepop
20  end interface roctxrangepop
21 
22  public :: roctxstartrange, roctxrangepusha, roctxrangepop
23 
24 contains
25 
26  subroutine roctxstartrange(name)
27  character(kind=c_char,len=*) :: name
28  character :: c_name(roctx_max_len)
29  integer:: i, str_len
30 
31  str_len = len(trim(name))
32  do i = 1, len(trim(name))
33  c_name(i) = name(i:i)
34  end do
35  c_name(str_len+1) = c_null_char
36 
37  call roctxrangepusha(c_name)
38 
39  end subroutine roctxstartrange
40 
41 #endif
42 end module roctx
Interfxace to ROCTX.
Definition: roctx.F90:2
integer, parameter roctx_max_len
Definition: roctx.F90:7