25 void throw_ill_formed(
26 T lower, T upper, SourceLocation call, SourceLocation loc = SourceLocation{}) {
28 "this range is ill formed normally upper > lower\n lower = {}, upper = {}\n "
29 "call to check_throw = {}",
36 void CoordRange<f32_3>::check_throw_ranges(SourceLocation loc) {
37 if (lower.x() >= upper.x()) {
38 throw_ill_formed(lower, upper, loc);
40 if (lower.y() >= upper.y()) {
41 throw_ill_formed(lower, upper, loc);
43 if (lower.z() >= upper.z()) {
44 throw_ill_formed(lower, upper, loc);
49 void CoordRange<f64_3>::check_throw_ranges(SourceLocation loc) {
50 if (lower.x() >= upper.x()) {
51 throw_ill_formed(lower, upper, loc);
53 if (lower.y() >= upper.y()) {
54 throw_ill_formed(lower, upper, loc);
56 if (lower.z() >= upper.z()) {
57 throw_ill_formed(lower, upper, loc);
62 void CoordRange<u16_3>::check_throw_ranges(SourceLocation loc) {
63 if (lower.x() >= upper.x()) {
64 throw_ill_formed(lower, upper, loc);
66 if (lower.y() >= upper.y()) {
67 throw_ill_formed(lower, upper, loc);
69 if (lower.z() >= upper.z()) {
70 throw_ill_formed(lower, upper, loc);
75 void CoordRange<u32_3>::check_throw_ranges(SourceLocation loc) {
76 if (lower.x() >= upper.x()) {
77 throw_ill_formed(lower, upper, loc);
79 if (lower.y() >= upper.y()) {
80 throw_ill_formed(lower, upper, loc);
82 if (lower.z() >= upper.z()) {
83 throw_ill_formed(lower, upper, loc);
88 void CoordRange<u64_3>::check_throw_ranges(SourceLocation loc) {
89 if (lower.x() >= upper.x()) {
90 throw_ill_formed(lower, upper, loc);
92 if (lower.y() >= upper.y()) {
93 throw_ill_formed(lower, upper, loc);
95 if (lower.z() >= upper.z()) {
96 throw_ill_formed(lower, upper, loc);
101 void CoordRange<i32_3>::check_throw_ranges(SourceLocation loc) {
102 if (lower.x() >= upper.x()) {
103 throw_ill_formed(lower, upper, loc);
105 if (lower.y() >= upper.y()) {
106 throw_ill_formed(lower, upper, loc);
108 if (lower.z() >= upper.z()) {
109 throw_ill_formed(lower, upper, loc);
114 void CoordRange<i64_3>::check_throw_ranges(SourceLocation loc) {
115 if (lower.x() >= upper.x()) {
116 throw_ill_formed(lower, upper, loc);
118 if (lower.y() >= upper.y()) {
119 throw_ill_formed(lower, upper, loc);
121 if (lower.z() >= upper.z()) {
122 throw_ill_formed(lower, upper, loc);
This header file contains utility functions related to exception handling in the code.
Define the fmt formatters for sycl::vec.
ExcptTypes make_except_with_loc(std::string message, SourceLocation loc=SourceLocation{})
Create an exception with a message and a location.
namespace for math utility
std::string format_multiline() const
format the location in multiple lines