Skip to content

Commit

Permalink
scope of kernelList
Browse files Browse the repository at this point in the history
  • Loading branch information
blegouix committed Feb 10, 2024
1 parent c01f288 commit 13ce5bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions profiling/simple-kernel-timer/kp_kernel_timer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ void kokkosp_finalize_library() {
free(hostname);
FILE* output_data = fopen(fileOutput, "wb");

std::vector<KernelPerformanceInfo*> kernelList;

const double totalExecuteTime = (finishTime - initTime);
if (!kokkos_tools_timer_json) {
fwrite(&totalExecuteTime, sizeof(totalExecuteTime), 1, output_data);
Expand All @@ -88,6 +86,8 @@ void kokkosp_finalize_library() {
kernel_itr->second->writeToBinaryFile(output_data);
}
} else {
std::vector<KernelPerformanceInfo*> kernelList;

for (auto kernel_itr = count_map.begin(); kernel_itr != count_map.end();
kernel_itr++) {
kernelList.push_back(kernel_itr->second);
Expand Down

0 comments on commit 13ce5bf

Please sign in to comment.