Skip to content

Commit

Permalink
Add missing comment fixes
Browse files Browse the repository at this point in the history
Signed-off-by: rbramand <[email protected]>
  • Loading branch information
rbramand committed Nov 13, 2024
1 parent fccc82e commit c2e4500
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/runtime_src/core/common/api/xrt_hw_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ class hw_context_impl : public std::enable_shared_from_this<hw_context_impl>
// add module to map if kernel name is different, else throw
if (m_module_map.find(kernel_name) != m_module_map.end())
throw std::runtime_error("config with kernel already exists, cannot add this config\n");
m_module_map[kernel_name] = std::move(module);

m_module_map.emplace(std::move(kernel_name), std::move(module));
}

void
Expand Down
1 change: 1 addition & 0 deletions src/runtime_src/core/common/api/xrt_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1511,6 +1511,7 @@ class kernel_impl : public std::enable_shared_from_this<kernel_impl>
// kernel name will be of format - <kernel_name>:<ctrl code index>
if (auto i = name.find(":"); i != std::string::npos)
return std::stoul(name.substr(i+1, name.size()-i-1));

return 0; // default case
}

Expand Down

0 comments on commit c2e4500

Please sign in to comment.