From 199988338be3a7fda4d700363d9ae58900bea3cb Mon Sep 17 00:00:00 2001 From: Vivek Kale <11766050+vlkale@users.noreply.github.com> Date: Mon, 6 May 2024 08:57:32 -0700 Subject: [PATCH] kp_sampler_skip.cpp: apply clang-format --- common/kokkos-sampler/kp_sampler_skip.cpp | 42 +++++++++++------------ 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/common/kokkos-sampler/kp_sampler_skip.cpp b/common/kokkos-sampler/kp_sampler_skip.cpp index a4843f292..9c4f8fb21 100644 --- a/common/kokkos-sampler/kp_sampler_skip.cpp +++ b/common/kokkos-sampler/kp_sampler_skip.cpp @@ -228,7 +228,7 @@ 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) { @@ -236,28 +236,26 @@ void kokkosp_init_library(const int loadSeq, const uint64_t interfaceVer, } 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)();