Skip to content

Commit

Permalink
Remove superfluous graph_generator::m_buffer_mutex
Browse files Browse the repository at this point in the history
  • Loading branch information
fknorr committed Aug 31, 2022
1 parent aa0239b commit 02258c0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
3 changes: 0 additions & 3 deletions include/graph_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,6 @@ namespace detail {

std::unordered_map<node_id, per_node_data> m_node_data;

// This mutex mainly serves to protect per-buffer data structures, as new buffers might be added at any time.
std::mutex m_buffer_mutex;

void set_epoch_for_new_commands(per_node_data& node_data, const command_id epoch);

void reduce_execution_front_to(abstract_command* new_front);
Expand Down
2 changes: 0 additions & 2 deletions src/graph_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ namespace detail {
}

void graph_generator::add_buffer(buffer_id bid, const cl::sycl::range<3>& range) {
std::lock_guard<std::mutex> lock(m_buffer_mutex);
// Initialize the whole range to all nodes, so that we always use local buffer ranges when they haven't been written to (on any node) yet.
// TODO: Consider better handling for when buffers are not host initialized
std::vector<node_id> all_nodes(m_num_nodes);
Expand All @@ -37,7 +36,6 @@ namespace detail {
}

void graph_generator::build_task(const task& tsk, const std::vector<graph_transformer*>& transformers) {
std::lock_guard<std::mutex> lock(m_buffer_mutex);
// TODO: Maybe assert that this task hasn't been processed before

const auto tid = tsk.get_id();
Expand Down

0 comments on commit 02258c0

Please sign in to comment.