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 authored May 6, 2024
1 parent a426547 commit 1999883
Showing 1 changed file with 20 additions and 22 deletions.
42 changes: 20 additions & 22 deletions common/kokkos-sampler/kp_sampler_skip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,36 +228,34 @@ void kokkosp_init_library(const int loadSeq, const uint64_t interfaceVer,
if ((NULL != tool_sample) && (tool_prob_num == -1.0)) {
// If the user touched the sample skip rate variable
// and the tool probability is set to -1 (no probability sampling
// desired), then use only sampler skip rate.
// desired), then use only sampler skip rate.
tool_prob_num = 100.0;
kernelSampleSkip = atoi(tool_sample) + 1;
if (tool_verbosity > 0) {
std::cout << "KokkosP: Sampling rate set to: " << tool_sample << "\n";
}
return;
}

if (tool_prob_num == -1.0)
{
// If the tool probability is set to -1 (no probability sampling
// desired) and the user also didn't set
// skip rate, then use a default with a probability sampling of 10%.

if (tool_verbosity > 0) {
std::cout << "KokkosP: Neither the probability nor the skip rate for "
"sampling were set...\n";
}
tool_prob_num = 10.0;
kernelSampleSkip = 1;
if (tool_verbosity > 0) {
std::cout
<< "KokkosP: The probability for the sampler is set to the default of "
<< tool_prob_num
<< " percent. The skip rate for sampler will not be used.\n";
}
}
} // end kokkosp_init_library

if (tool_prob_num == -1.0) {
// If the tool probability is set to -1 (no probability sampling
// desired) and the user also didn't set
// skip rate, then use a default with a probability sampling of 10%.

if (tool_verbosity > 0) {
std::cout << "KokkosP: Neither the probability nor the skip rate for "
"sampling were set...\n";
}
tool_prob_num = 10.0;
kernelSampleSkip = 1;
if (tool_verbosity > 0) {
std::cout << "KokkosP: The probability for the sampler is set to the "
"default of "
<< tool_prob_num
<< " percent. The skip rate for sampler will not be used.\n";
}
}
} // end kokkosp_init_library

void kokkosp_finalize_library() {
if (NULL != finalizeProfileLibrary) (*finalizeProfileLibrary)();
Expand Down

0 comments on commit 1999883

Please sign in to comment.