Skip to content

Commit c166777

Browse files
author
Shahab Layeghi
committed
[SYCL] Use a global flush buffer in stream
Add a comment per review. Signed-off-by: Shahab Layeghi <[email protected]>
1 parent b3b1d61 commit c166777

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

sycl/include/CL/sycl/detail/accessor_impl.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,15 @@ class __SYCL_EXPORT AccessorImplHost {
7979
MElemSize(Other.MElemSize), MOffsetInBytes(Other.MOffsetInBytes),
8080
MIsSubBuffer(Other.MIsSubBuffer) {}
8181

82+
// The resize method provides a way to change the size of the
83+
// allocated memory and corresponding properties for the accessor.
84+
// These are normally fixed for the accessor, but this capability
85+
// is needed to support the stream class.
86+
// Stream implementation creates an accessor with initial size for
87+
// work item. But the number of work items is not available during
88+
// stream construction. The resize method allows to update the accessor
89+
// as the information becomes available to the handler.
90+
8291
void resize(size_t GlobalSize);
8392

8493
id<3> MOffset;

0 commit comments

Comments
 (0)