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
13 changes: 10 additions & 3 deletions sycl/source/detail/device_global_map.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,17 @@ class DeviceGlobalMap {
DeviceGlobalMap(bool OwnerControlledCleanup)
: MOwnerControlledCleanup{OwnerControlledCleanup} {}

DeviceGlobalMap(const DeviceGlobalMap &) = delete;
DeviceGlobalMap &operator=(const DeviceGlobalMap &) = delete;

~DeviceGlobalMap() {
if (!MOwnerControlledCleanup)
for (auto &DeviceGlobalIt : MDeviceGlobals)
DeviceGlobalIt.second->cleanup();
try {
if (!MOwnerControlledCleanup)
for (auto &DeviceGlobalIt : MDeviceGlobals)
DeviceGlobalIt.second->cleanup();
} catch (std::exception &e) {
__SYCL_REPORT_EXCEPTION_TO_STREAM("exception in ~DeviceGlobalMap", e);
}
}

void initializeEntries(const RTDeviceBinaryImage *Img) {
Expand Down
4 changes: 2 additions & 2 deletions sycl/source/detail/device_global_map_entry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ struct DeviceGlobalMapEntry {
// Constructor for only initializing ID and pointer. The other members will
// be initialized later.
DeviceGlobalMapEntry(std::string UniqueId, const void *DeviceGlobalPtr)
: MUniqueId(UniqueId), MDeviceGlobalPtr(DeviceGlobalPtr) {}
: MUniqueId(std::move(UniqueId)), MDeviceGlobalPtr(DeviceGlobalPtr) {}

// Constructor for only initializing ID, type size, and device image scope
// flag. The pointer to the device global will be initialized later.
DeviceGlobalMapEntry(std::string UniqueId, const RTDeviceBinaryImage *Img,
std::uint32_t DeviceGlobalTSize,
bool IsDeviceImageScopeDecorated)
: MUniqueId(UniqueId), MImages{Img},
: MUniqueId(std::move(UniqueId)), MImages{Img},
MImageIdentifiers{reinterpret_cast<uintptr_t>(Img)},
MDeviceGlobalTSize(DeviceGlobalTSize),
MIsDeviceImageScopeDecorated(IsDeviceImageScopeDecorated) {}
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/property_set_io.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static IntT stringViewToInt(const std::string_view &SV) {
if (SV.empty())
return Result;

bool Negate = std::is_signed_v<IntT> && SV[0] == '-';
const bool Negate = std::is_signed_v<IntT> && SV[0] == '-';

for (size_t I = static_cast<size_t>(Negate); I < SV.size(); ++I) {
const char CurrentC = SV[I];
Expand Down
1 change: 1 addition & 0 deletions xpti/include/xpti/xpti_trace_framework.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1731,6 +1731,7 @@ class tracepoint_t {
m_default_event_type = (uint16_t)xpti::trace_event_type_t::algorithm;
m_default_activity_type = xpti::trace_activity_type_t::active;
m_default_name = "Message"; // Likely never used
m_instID = 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity was complaining about this field be left uninitialized in the constructor.

}
/// The payload data structure that is prepared from code_location(),
/// caller_callee string or kernel name/codepointer based on the opt-in flag.
Expand Down