12 integer,
private ::
col(7) = [ &
13 int(z
'0000ff00'), int(z
'000000ff'), int(z
'00ffff00'), &
14 int(z
'00ff00ff'), int(z
'0000ffff'), int(z
'00ff0000'), &
20 type,
bind(C) :: nvtxEventAttributes
21 integer(c_int16_t) :: version = 1
22 integer(c_int16_t) :: size = 48
23 integer(c_int) :: category = 0
24 integer(c_int) :: colortype = 1
25 integer(c_int) :: color
26 integer(c_int) :: payloadtype = 0
27 integer(c_int) :: reserved0
28 integer(c_int64_t) :: payload
29 integer(c_int) :: messagetype = 1
30 type(c_ptr) :: message
33#if defined(MFC_GPU) && defined(__PGI)
37 subroutine nvtxrangepusha(name) bind(C, name='nvtxRangePushA')
40 character(kind=c_char, len=*),
intent(IN) :: name
41 end subroutine nvtxrangepusha
44 subroutine nvtxrangepushex(event) bind(C, name='nvtxRangePushEx')
49 end subroutine nvtxrangepushex
63 character(kind=c_char, len=*),
intent(IN) :: name
64 integer,
intent(IN),
optional :: id
67#if defined(MFC_GPU) && defined(__PGI)
71 if (.not.
present(id))
then
74 event%color =
col(mod(id, 7) + 1)
76 call nvtxrangepushex(event)
84#if defined(MFC_GPU) && defined(__PGI)
NVIDIA NVTX profiling API bindings for GPU performance instrumentation.
subroutine nvtxstartrange(name, id)
Pushes a named NVTX range for GPU profiling, optionally with a color based on the given identifier.
character(len=256), private tempname
subroutine nvtxendrange
Pops the current NVTX range to end the GPU profiling region.
integer, dimension(7), private col