Skip to content

Commit

Permalink
Fix tool glob fence to bool
Browse files Browse the repository at this point in the history
  • Loading branch information
vlkale authored Sep 6, 2023
1 parent 75b23d7 commit cf105ff
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions common/kokkos-sampler/kp_sampler_skip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ static uint64_t kernelSampleSkip =
static float tool_prob_num =
1.0; // Default probability of 1 percent of all invocations
static int tool_verbosity = 0;
static int tool_globFence = 0;
static bool tool_globFence = 0;

typedef void (*initFunction)(const int, const uint64_t, const uint32_t, void*);
typedef void (*finalizeFunction)();
Expand All @@ -33,10 +33,11 @@ static endFunction endReduceCallee = NULL;

void kokkosp_request_tool_settings(const uint32_t,
Kokkos_Tools_ToolSettings* settings) {
if (0 == tool_globFence) {
settings->requires_global_fencing = false;
} else {
settings->requires_global_fencing = true;
if (tool_globFence) {
settings->requires_global_fencing = true;
} else {
settings->requires_global_fencing = false;
}
}

Expand All @@ -51,9 +52,9 @@ void kokkosp_init_library(const int loadSeq, const uint64_t interfaceVer,
tool_verbosity = 0;
}
if (NULL != tool_globFence_str) {
tool_globFence = atoi(tool_globFence_str);
tool_globFence = (atoi(tool_global_fences) != 0);
} else {
tool_globFence = 0;
tool_globFence = false;
}

char* profileLibrary = getenv("KOKKOS_TOOLS_LIBS");
Expand Down

0 comments on commit cf105ff

Please sign in to comment.