[llvm] [libsycl] Implement fill & memset queue API (PR #217933)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 22 03:54:42 PDT 2026
================
@@ -560,6 +641,18 @@ class _LIBSYCL_EXPORT queue {
/// \return an event representing last kernel invocation.
event getLastEvent();
+ /// Submits a fill operation that replicates a pattern into USM accessible
+ /// on the device associated with the queue.
+ ///
+ /// \param Ptr is the pointer to memory to be filled.
+ /// \param Pattern is the pattern to be replicated.
+ /// \param PatternSize is the size of the pattern in bytes.
+ /// \param Count is the number of times the pattern is filled.
+ /// \param DepEvents is a vector of events that represent dependencies for the
+ /// operation.
+ event fillImpl(void *Ptr, const void *Pattern, std::size_t PatternSize,
----------------
Robertkq wrote:
This doesn't match up with existing code and `queue::fillImpl` is mostly a wrapper towards `impl->fill`. I don't see a reason for which this fill needs special treatment
Can you remove this function and move it's code into
```cpp
template <typename T>
event fill(void *ptr, const T &pattern, std::size_t count,
const std::vector<event> &depEvents) {
// here
}
```
or explain why this needs special treatment?
https://github.com/llvm/llvm-project/pull/217933
More information about the llvm-commits
mailing list