Skip to content

Commit

Permalink
fixed matching of kp_sampler with kokkosp_end check
Browse files Browse the repository at this point in the history
  • Loading branch information
vlkale committed Sep 7, 2023
1 parent 761fcc9 commit 4b3bda1
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions common/kokkos-sampler/kp_sampler_skip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,19 @@ void kokkosp_begin_parallel_for(const char* name, const uint32_t devID,
}
}

void kokkosp_end_parallel_for(const uint64_t kID) {
if (tool_verbosity > 0) {
printf("KokkosP: sample %llu calling child-end function...\n",
(unsigned long long)(kID));
}
void kokkosp_end_parallel_for(const uint64_t kID) {

if (NULL != endForCallee) {
uint64_t retrievedNestedkID = infokIDSample.at(kID);
(*endForCallee)(retrievedNestedkID);
}
if ( !(infokIDSample.find(kID) == infokIDSample.end()) )
{
uint64_t retrievedNestedkID = infokIDSample.at(kID);
if (tool_verbosity > 0) {
printf("KokkosP: sample %llu calling child-end function...\n",
(unsigned long long)(kID));
}
(*endForCallee)(retrievedNestedkID);
}
}
}

void kokkosp_begin_parallel_scan(const char* name, const uint32_t devID,
Expand Down

0 comments on commit 4b3bda1

Please sign in to comment.