Skip to content

Commit

Permalink
Correct building of std::optional<device_resources>
Browse files Browse the repository at this point in the history
  • Loading branch information
wphicks committed Nov 30, 2023
1 parent 4d77a17 commit 3424529
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions cpp/include/raft/core/device_resources_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,10 @@ struct device_resources_manager {
auto scoped_device = device_setter(device_id);
// Build the device_resources object for this thread out of shared
// components
thread_resources[device_id] =
raft::device_resources{component_iter->get_stream(),
component_iter->get_pool(),
component_iter->get_workspace_memory_resource(),
component_iter->get_workspace_allocation_limit()};
thread_resources[device_id].emplace(component_iter->get_stream(),
component_iter->get_pool(),
component_iter->get_workspace_memory_resource(),
component_iter->get_workspace_allocation_limit());
}

return thread_resources[device_id].value();
Expand Down

0 comments on commit 3424529

Please sign in to comment.