Skip to content

Commit

Permalink
kp_sampler_skip.cpp: apply clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
vlkale committed Apr 2, 2024
1 parent e1aacb0 commit 0801d92
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions common/kokkos-sampler/kp_sampler_skip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,20 +195,20 @@ void kokkosp_begin_parallel_for(const char* name, const uint32_t devID,
static uint64_t invocationNum = 0;
++invocationNum;
if ((invocationNum % kernelSampleSkip) == 0) {
if (tool_verbosity > 0) {
std::cout << "KokkosP: sample " << *kID
<< " calling child-begin function...\n";
}
if (tool_verbosity > 0) {
std::cout << "KokkosP: sample " << *kID
<< " calling child-begin function...\n";
}
if (tool_globFence) {
invoke_ktools_fence(0);
}
if (NULL != beginForCallee) {
uint64_t nestedkID = 0;
(*beginForCallee)(name, devID, &nestedkID);
if (tool_verbosity > 0) {
std::cout << "KokkosP: sample " << *kID
std::cout << "KokkosP: sample " << *kID
<< " finished with child-begin function.\n";
}
}
infokIDSample.insert({*kID, nestedkID});
}
}
Expand All @@ -219,18 +219,18 @@ void kokkosp_end_parallel_for(const uint64_t kID) {
if (!(infokIDSample.find(kID) == infokIDSample.end())) {
uint64_t retrievedNestedkID = infokIDSample[kID];
if (tool_verbosity > 0) {
std::cout << "KokkosP: sample " << kID
<< " calling child-end function...\n";
std::cout << "KokkosP: sample " << kID
<< " calling child-end function...\n";
}

if (tool_globFence) {
invoke_ktools_fence(0);
}
(*endForCallee)(retrievedNestedkID);
if (tool_verbosity > 0) {
std::cout << "KokkosP: sample " << kID
std::cout << "KokkosP: sample " << kID
<< " finished with child-end function.\n";
}
}
infokIDSample.erase(kID);
}
}
Expand All @@ -243,8 +243,8 @@ void kokkosp_begin_parallel_scan(const char* name, const uint32_t devID,
++invocationNum;
if ((invocationNum % kernelSampleSkip) == 0) {
if (tool_verbosity > 0) {
std::cout << "KokkosP: sample " << *kID
<< " calling child-begin function...\n";
std::cout << "KokkosP: sample " << *kID
<< " calling child-begin function...\n";
}
if (NULL != beginScanCallee) {
uint64_t nestedkID = 0;
Expand All @@ -253,9 +253,9 @@ void kokkosp_begin_parallel_scan(const char* name, const uint32_t devID,
}
(*beginScanCallee)(name, devID, &nestedkID);
if (tool_verbosity > 0) {
std::cout << "KokkosP: sample " << *kID
std::cout << "KokkosP: sample " << *kID
<< " finished with child-begin function.\n";
}
}
infokIDSample.insert({*kID, nestedkID});
}
}
Expand All @@ -266,17 +266,17 @@ void kokkosp_end_parallel_scan(const uint64_t kID) {
if (!(infokIDSample.find(kID) == infokIDSample.end())) {
uint64_t retrievedNestedkID = infokIDSample[kID];
if (tool_verbosity > 0) {
std::cout << "KokkosP: sample " << kID
<< " calling child-end function...\n";
std::cout << "KokkosP: sample " << kID
<< " calling child-end function...\n";
}
if (tool_globFence) {
invoke_ktools_fence(0);
}
(*endScanCallee)(retrievedNestedkID);
if (tool_verbosity > 0) {
if (tool_verbosity > 0) {
std::cout << "KokkosP: sample " << kID
<< " finished with child-end function.\n";
}
<< " finished with child-end function.\n";
}
infokIDSample.erase(kID);
}
}
Expand All @@ -289,17 +289,17 @@ void kokkosp_begin_parallel_reduce(const char* name, const uint32_t devID,
++invocationNum;
if ((invocationNum % kernelSampleSkip) == 0) {
if (tool_verbosity > 0) {
std::cout << "KokkosP: sample " << *kID
<< " calling child-begin function...\n";
std::cout << "KokkosP: sample " << *kID
<< " calling child-begin function...\n";
}
if (NULL != beginReduceCallee) {
uint64_t nestedkID = 0;
if (tool_globFence) {
invoke_ktools_fence(0);
}
(*beginReduceCallee)(name, devID, &nestedkID);
if (tool_verbosity > 0) {
std::cout << "KokkosP: sample " << *kID
if (tool_verbosity > 0) {
std::cout << "KokkosP: sample " << *kID
<< " finished with child-begin function.\n";
}
infokIDSample.insert({*kID, nestedkID});
Expand All @@ -313,15 +313,15 @@ void kokkosp_end_parallel_reduce(const uint64_t kID) {
uint64_t retrievedNestedkID = infokIDSample[kID];
if (tool_verbosity > 0) {
std::cout << "KokkosP: sample " << kID
<< " calling child-end function...\n";
<< " calling child-end function...\n";
}
if (tool_globFence) {
invoke_ktools_fence(0);
}
(*endReduceCallee)(retrievedNestedkID);
if (tool_verbosity > 0) {
if (tool_verbosity > 0) {
std::cout << "KokkosP: sample " << kID
<< " finished with child-end function.\n";
<< " finished with child-end function.\n";
}
infokIDSample.erase(kID);
}
Expand Down

0 comments on commit 0801d92

Please sign in to comment.