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 6, 2024
1 parent 17ed285 commit 7b8db70
Showing 1 changed file with 23 additions and 11 deletions.
34 changes: 23 additions & 11 deletions common/kokkos-sampler/kp_sampler_skip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ void invoke_ktools_fence(uint32_t devID) {
if (tpi_funcs.fence != nullptr) {
tpi_funcs.fence(devID);
if (tool_verbosity > 1) {
std::cout << "KokkosP: Sampler utility sucessfully invoked tool-induced fence on device "
std::cout << "KokkosP: Sampler utility sucessfully invoked tool-induced "
"fence on device "
<< getDeviceID(devID) << ".\n";
}
} else {
std::cout << "KokkosP: FATAL: Kokkos Tools Programming Interface's tool-invoked Fence is NULL!\n";
std::cout << "KokkosP: FATAL: Kokkos Tools Programming Interface's "
"tool-invoked Fence is NULL!\n";
exit(-1);
}
}
Expand All @@ -64,7 +66,8 @@ void kokkosp_provide_tool_programming_interface(
uint32_t num_funcs, Kokkos_Tools_ToolProgrammingInterface funcsFromTPI) {
if (!num_funcs) {
if (tool_verbosity > 0)
std::cout << "KokkosP: Note: Number of functions in Tools Programming Interface is 0!\n";
std::cout << "KokkosP: Note: Number of functions in Tools Programming "
"Interface is 0!\n";
}
tpi_funcs = funcsFromTPI;
}
Expand All @@ -91,7 +94,8 @@ void kokkosp_init_library(const int loadSeq, const uint64_t interfaceVer,
"variable. Please use KOKKOS_TOOLS_LIBS\n");
profileLibrary = getenv("KOKKOS_PROFILE_LIBRARY");
if (NULL == profileLibrary) {
std::cout << "KokkosP: FATAL: No library to call in " << profileLibrary << "!\n";
std::cout << "KokkosP: FATAL: No library to call in " << profileLibrary
<< "!\n";
exit(-1);
}
}
Expand All @@ -108,7 +112,9 @@ void kokkosp_init_library(const int loadSeq, const uint64_t interfaceVer,
nextLibrary = strtok(NULL, ";");

if (NULL == nextLibrary) {
std::cout << "KokkosP: FATAL: No child library of sampler utility library to call in " << profileLibrary << "!\n";
std::cout << "KokkosP: FATAL: No child library of sampler utility library "
"to call in "
<< profileLibrary << "!\n";
exit(-1);
} else {
if (tool_verbosity > 0) {
Expand Down Expand Up @@ -149,12 +155,18 @@ void kokkosp_init_library(const int loadSeq, const uint64_t interfaceVer,

if (tool_verbosity > 0) {
std::cout << "KokkosP: Function Status:\n";
std::cout << "KokkosP: begin-parallel-for: " << ((beginForCallee == NULL) ? "no" : "yes") << "\n";
std::cout << "KokkosP: begin-parallel-scan: " << ((beginScanCallee == NULL) ? "no" : "yes") << "\n";
std::cout << "KokkosP: begin-parallel-reduce: " << ((beginReduceCallee == NULL) ? "no" : "yes") << "\n";
std::cout << "KokkosP: end-parallel-for: " << ((endForCallee == NULL) ? "no" : "yes") << "\n";
std::cout << "KokkosP: end-parallel-scan: " << ((endScanCallee == NULL) ? "no" : "yes") << "\n";
std::cout << "KokkosP: end-parallel-reduce: " << ((endReduceCallee == NULL) ? "no" : "yes") << "\n";
std::cout << "KokkosP: begin-parallel-for: "
<< ((beginForCallee == NULL) ? "no" : "yes") << "\n";
std::cout << "KokkosP: begin-parallel-scan: "
<< ((beginScanCallee == NULL) ? "no" : "yes") << "\n";
std::cout << "KokkosP: begin-parallel-reduce: "
<< ((beginReduceCallee == NULL) ? "no" : "yes") << "\n";
std::cout << "KokkosP: end-parallel-for: "
<< ((endForCallee == NULL) ? "no" : "yes") << "\n";
std::cout << "KokkosP: end-parallel-scan: "
<< ((endScanCallee == NULL) ? "no" : "yes") << "\n";
std::cout << "KokkosP: end-parallel-reduce: "
<< ((endReduceCallee == NULL) ? "no" : "yes") << "\n";
}
}
}
Expand Down

0 comments on commit 7b8db70

Please sign in to comment.