OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm::twoD::gpu::kperf::detail Namespace Reference

Typedefs

using clock = std::chrono::steady_clock
 

Functions

void begin_dispatch (const char *name, std::uint32_t, std::uint64_t *kID)
 Begin one paired host-dispatch timing record.
 
void end_dispatch (std::uint64_t kID)
 Finish a paired host-side dispatch timing record.
 
void begin_fence (const char *, std::uint32_t, std::uint64_t *handle)
 Start timing a Kokkos fence callback pair.
 
void end_fence (std::uint64_t)
 Accumulate elapsed host wall for a paired Kokkos fence.
 
void begin_deep_copy (Kokkos_Profiling_SpaceHandle dst, const char *, const void *, Kokkos_Profiling_SpaceHandle src, const char *, const void *, std::uint64_t size)
 Count a Kokkos deep-copy dispatch and its logical direction/bytes.
 

Variables

thread_local std::vector< clock::time_point > dispatch_t0
 
thread_local std::vector< clock::time_point > fence_t0
 

Typedef Documentation

◆ clock

using openswmm::twoD::gpu::kperf::detail::clock = std::chrono::steady_clock

Function Documentation

◆ begin_deep_copy()

void openswmm::twoD::gpu::kperf::detail::begin_deep_copy ( Kokkos_Profiling_SpaceHandle dst,
const char * ,
const void * ,
Kokkos_Profiling_SpaceHandle src,
const char * ,
const void * ,
std::uint64_t size )
inline

Count a Kokkos deep-copy dispatch and its logical direction/bytes.

Parameters
[in]dstDestination memory-space handle; a name starting with Host is classified as host.
[in]srcSource memory-space handle, classified by the same prefix rule.
[in]sizeBytes transferred, accumulated without overflow checks.
Unnamed callback arguments Destination/source label strings and raw pointers are ignored;
pointers are neither dereferenced nor retained.
Postcondition
Active counters increment deep-copy count and H2D, D2H or same-space bytes. No fence/timing/allocation occurs. Same counter object requires serialized callback access.
Here is the caller graph for this function:

◆ begin_dispatch()

void openswmm::twoD::gpu::kperf::detail::begin_dispatch ( const char * name,
std::uint32_t ,
std::uint64_t * kID )
inline

Begin one paired host-dispatch timing record.

Parameters
[in]nameRequired stable NUL-terminated kernel label supplied by Kokkos; copied on first use.
[out]kIDRequired caller record, set to zero even without an active counter scope; otherwise assigned the local kernel-label index.
Unnamed callback argument The middle uint32_t is Kokkos's device identifier; it is
ignored.
Postcondition
With an active scope, increments launch count and pushes a host-clock timestamp. Requires strictly paired same-thread callbacks and exclusive counter access. First labels/stack growth may allocate/throw; measures dispatch wall, not asynchronous device execution.
Here is the caller graph for this function:

◆ begin_fence()

void openswmm::twoD::gpu::kperf::detail::begin_fence ( const char * ,
std::uint32_t ,
std::uint64_t * handle )
inline

Start timing a Kokkos fence callback pair.

Parameters
[out]handleRequired output, always set to zero; pairing uses the thread-local stack.
Unnamed callback arguments The label string and uint32_t device identifier are ignored
and not retained.
Postcondition
Pushes a clock timestamp only within an active Scope; stack growth may allocate/throw. Must pair on the same thread before scope changes.
Here is the caller graph for this function:

◆ end_dispatch()

void openswmm::twoD::gpu::kperf::detail::end_dispatch ( std::uint64_t kID)
inline

Finish a paired host-side dispatch timing record.

Parameters
[in]kIDKernel-label index supplied by begin_dispatch().
Postcondition
Pops the latest dispatch timestamp when an active scope/stack exists; valid indices increment label count and elapsed seconds. Invalid indices still consume the timestamp. No-op without active scope or a matching begin. No allocation; same-thread pairing required.
Here is the caller graph for this function:

◆ end_fence()

void openswmm::twoD::gpu::kperf::detail::end_fence ( std::uint64_t )
inline

Accumulate elapsed host wall for a paired Kokkos fence.

Unnamed callback argument The uint64_t handle is ignored; the newest same-thread fence
timestamp is used.
Postcondition
Within an active scope and nonempty timestamp stack, adds elapsed seconds, pops the timestamp and increments fence count. Otherwise a no-op. No allocation; no fence is issued by this callback.
Here is the caller graph for this function:

Variable Documentation

◆ dispatch_t0

thread_local std::vector<clock::time_point> openswmm::twoD::gpu::kperf::detail::dispatch_t0
inline

Dispatch begin/end pairs nest strictly on the calling thread, so a stack of start times pairs them; the uint64_t Kokkos hands back carries the kernel id assigned at begin.

◆ fence_t0

thread_local std::vector<clock::time_point> openswmm::twoD::gpu::kperf::detail::fence_t0
inline