Skip to content
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

[SYCL] Remove old SYCL 1.2 exception subclasses #14546

Merged
merged 3 commits into from
Jul 13, 2024
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
47 changes: 0 additions & 47 deletions sycl/include/sycl/exception.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,53 +150,6 @@ class __SYCL_EXPORT exception : public virtual std::exception {
pi_int32 pi_err);
};

class __SYCL2020_DEPRECATED(
"use sycl::exception with sycl::errc::runtime instead.") runtime_error
: public exception {
public:
runtime_error() : exception(make_error_code(errc::runtime)) {}

runtime_error(const char *Msg, pi_int32 Err)
: runtime_error(std::string(Msg), Err) {}

runtime_error(const std::string &Msg, pi_int32 Err)
: exception(make_error_code(errc::runtime), Msg, Err) {}

runtime_error(std::error_code Ec, const std::string &Msg,
const pi_int32 PIErr)
: exception(Ec, Msg, PIErr) {}

protected:
runtime_error(std::error_code Ec) : exception(Ec) {}
};

class __SYCL2020_DEPRECATED(
"use sycl::exception with sycl::errc::nd_range instead.") nd_range_error
: public runtime_error {
public:
nd_range_error() : runtime_error(make_error_code(errc::nd_range)) {}

nd_range_error(const char *Msg, pi_int32 Err)
: nd_range_error(std::string(Msg), Err) {}

nd_range_error(const std::string &Msg, pi_int32 Err)
: runtime_error(make_error_code(errc::nd_range), Msg, Err) {}
};

class __SYCL2020_DEPRECATED(
"use sycl::exception with a sycl::errc enum value instead.")
invalid_parameter_error : public runtime_error {
public:
invalid_parameter_error()
: runtime_error(make_error_code(errc::kernel_argument)) {}

invalid_parameter_error(const char *Msg, pi_int32 Err)
: invalid_parameter_error(std::string(Msg), Err) {}

invalid_parameter_error(const std::string &Msg, pi_int32 Err)
: runtime_error(make_error_code(errc::kernel_argument), Msg, Err) {}
};

} // namespace _V1
} // namespace sycl

Expand Down
6 changes: 0 additions & 6 deletions sycl/test/warnings/sycl_2020_deprecations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@ int main() {
// expected-warning@+1 {{'get_size' is deprecated: get_size() is deprecated, please use byte_size() instead}}
size_t VecGetSize = Vec.get_size();

// expected-warning@+1 {{'runtime_error' is deprecated: use sycl::exception with sycl::errc::runtime instead.}}
sycl::runtime_error re;
// expected-warning@+1 {{'nd_range_error' is deprecated: use sycl::exception with sycl::errc::nd_range instead.}}
sycl::nd_range_error ne;
// expected-warning@+1 {{'invalid_parameter_error' is deprecated: use sycl::exception with a sycl::errc enum value instead.}}
sycl::invalid_parameter_error ipe;
// expected-warning@+1{{'exception' is deprecated: The version of an exception constructor which takes no arguments is deprecated.}}
sycl::exception ex;

Expand Down
Loading