Skip to content

[SYCL] Fixed reported issues by a static verifier #10564

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 1, 2023
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
2 changes: 2 additions & 0 deletions sycl/include/sycl/ext/oneapi/sub_group_mask.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ struct sub_group_mask {
sub_group_mask(const sub_group_mask &rhs)
: Bits(rhs.Bits), bits_num(rhs.bits_num) {}

sub_group_mask &operator=(const sub_group_mask &rhs) = delete;

template <typename Group>
friend std::enable_if_t<std::is_same_v<std::decay_t<Group>, sub_group>,
sub_group_mask>
Expand Down
4 changes: 2 additions & 2 deletions sycl/include/sycl/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -751,14 +751,14 @@ template <typename Type, int NumElements> class vec {
// when root cause of API incompatibility will be fixed
#ifdef __SYCL_DEVICE_ONLY__
vec(const vec &Rhs) = default;
vec &operator=(const vec &Rhs) = default;
#else
constexpr vec(const vec &Rhs) : m_Data(Rhs.m_Data) {}
constexpr vec &operator=(const vec &Rhs) = default;
#endif

vec(vec &&Rhs) = default;

vec &operator=(const vec &Rhs) = default;

// W/o this, things like "vec<char,*> = vec<signed char, *>" doesn't work.
template <typename Ty = DataT>
typename std::enable_if_t<!std::is_same_v<Ty, rel_t> &&
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/queue_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ class queue_impl {
// SYCL app are not the same.
void *MTraceEvent = nullptr;
/// The stream under which the traces are emitted from the queue object
uint8_t MStreamID;
uint8_t MStreamID = 0;
/// The instance ID of the trace event for queue object
uint64_t MInstanceID = 0;

Expand Down
1 change: 1 addition & 0 deletions sycl/tools/xpti_helpers/usm_analyzer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ class USMAnalyzer {
bool TerminateOnError = false;

USMAnalyzer(const USMAnalyzer &obj) = delete;
USMAnalyzer &operator=(const USMAnalyzer &rhs) = delete;

static USMAnalyzer &getInstance() {
static USMAnalyzer s;
Expand Down