Skip to content

Commit a0aa401

Browse files
Address comments
Signed-off-by: Sergey Semenov <[email protected]>
1 parent 2857ca8 commit a0aa401

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

sycl/include/CL/sycl/detail/circular_buffer.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ template <typename T> class CircularBuffer {
8585
void clear() { MValues.clear(); }
8686

8787
private:
88+
// Deque is used as the underlying container for double-ended push/pop
89+
// operations and built-in iterator support. Frequent memory allocations
90+
// and deallocations are a concern, switching to an array/vector might be a
91+
// worthwhile optimization.
8892
std::deque<T> MValues;
8993
const size_t MCapacity;
9094
};

sycl/source/detail/scheduler/graph_builder.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ void Scheduler::GraphBuilder::AddNodeToLeaves(MemObjRecord *Record,
156156
: Record->MWriteLeaves};
157157
if (Leaves.full()) {
158158
Command *OldLeaf = Leaves.front();
159+
// TODO this is a workaround for duplicate leaves, remove once fixed
159160
if (OldLeaf == Cmd)
160161
return;
161162
// Add the old leaf as a dependency for the new one by duplicating one of

0 commit comments

Comments
 (0)