[llvm] [libsycl] Implement fill & memset queue API (PR #217933)
Kseniya Tikhomirova via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 24 05:03:50 PDT 2026
================
@@ -194,6 +194,27 @@ QueueImpl::memcpy(void *Dest, const void *Src, std::size_t NumBytes,
return createEvent();
}
+EventImplPtr QueueImpl::fill(void *Ptr, const void *Pattern,
+ std::size_t PatternSize, std::size_t Count,
+ const std::vector<EventImplPtr> &DepEvents) {
+ assert(PatternSize > 0);
+ checkEventsPlatformMatch(DepEvents, MDevice.getPlatformImpl());
+ if (Count == 0) {
+ handleEventDependencies(DepEvents);
+ return createEvent();
+ }
+
+ if (!Ptr) {
----------------
KseniyaTikhomirova wrote:
I would expect this to be checked before Count==0.
My logic is: Count ==0 is useless but valid scenario while Ptr==nullptr is invalid parameter that we should notify about.
what do you think?
https://github.com/llvm/llvm-project/pull/217933
More information about the llvm-commits
mailing list