Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions sycl/include/sycl/queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,10 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
/// \param Count is the number of times to fill Pattern into Ptr.
/// \return an event representing fill operation.
template <typename T> event fill(void *Ptr, const T &Pattern, size_t Count) {
return submit([&](handler &CGH) { CGH.fill<T>(Ptr, Pattern, Count); });
// TODO: to add code location as parameter when ABI break is permitted
const detail::code_location CodeLoc("sycl/queue.hpp", "fill", 0, 0);
return submit([&](handler &CGH) { CGH.fill<T>(Ptr, Pattern, Count); },
CodeLoc);
}

/// Fills the specified memory with the specified pattern.
Expand Down Expand Up @@ -708,7 +711,9 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
/// \param Count is a number of bytes to be prefetched.
/// \return an event representing prefetch operation.
event prefetch(const void *Ptr, size_t Count) {
return submit([=](handler &CGH) { CGH.prefetch(Ptr, Count); });
// TODO: to add code location as parameter when ABI break is permitted
const detail::code_location CodeLoc("sycl/queue.hpp", "prefetch", 0, 0);
return submit([=](handler &CGH) { CGH.prefetch(Ptr, Count); }, CodeLoc);
}

/// Provides hints to the runtime library that data should be made available
Expand Down
4 changes: 2 additions & 2 deletions sycl/unittests/xpti_trace/QueueApiFailures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ TEST_F(QueueApiFailures, QueueFill) {
std::string Message;
ASSERT_TRUE(queryReceivedNotifications(TraceType, Message));
EXPECT_EQ(TraceType, xpti::trace_diagnostics);
EXPECT_THAT(Message, HasSubstr(UnknownCodeLocation));
EXPECT_THAT(Message, HasSubstr("fill;sycl/queue.hpp"));
EXPECT_FALSE(queryReceivedNotifications(TraceType, Message));
}

Expand Down Expand Up @@ -302,7 +302,7 @@ TEST_F(QueueApiFailures, QueuePrefetch) {
std::string Message;
ASSERT_TRUE(queryReceivedNotifications(TraceType, Message));
EXPECT_EQ(TraceType, xpti::trace_diagnostics);
EXPECT_THAT(Message, HasSubstr(UnknownCodeLocation));
EXPECT_THAT(Message, HasSubstr("prefetch;sycl/queue.hpp"));
EXPECT_FALSE(queryReceivedNotifications(TraceType, Message));
}

Expand Down