Skip to content

Align platform::operator== and operator!= with SYCL 2020 #22455

Description

@KornevNikita

Describe the bug

Current impl:

bool operator==(const platform &rhs) const { return impl == rhs.impl; }
bool operator!=(const platform &rhs) const { return !(*this == rhs); }

According to SYCL 2020 should be:

friend bool operator==(const T& lhs, const T& rhs) { /* ... */ }
friend bool operator!=(const T& lhs, const T& rhs) { /* ... */ }

Need to replace old operators: guard old by "#ifndef __INTEL_PREVIEW_BREAKING_CHANGES" and add new under "#else". Thus we'll switch to new API with the next major release.

To reproduce

  1. Include a code snippet that is as short as possible
  2. Specify the command which should be used to compile the program
  3. Specify the command which should be used to launch the program
  4. Indicate what is wrong and what was expected

Environment

  • OS: [e.g Windows/Linux]
  • Target device and vendor: [e.g. Intel GPU]
  • DPC++ version: [e.g. commit hash or output of clang++ --version]
  • Dependencies version: [e.g. the output of sycl-ls --verbose]

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions