Skip to content

Commit 3d89061

Browse files
committed
[SYCL][Bindless][UR] clang format
1 parent 69d0137 commit 3d89061

2 files changed

Lines changed: 13 additions & 14 deletions

File tree

sycl/include/sycl/ext/oneapi/bindless_images_descriptor.hpp

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ enum class image_type : unsigned int {
5353
};
5454
/// image color space enum
5555
enum class image_color_space : uint32_t {
56-
linear = 0,
57-
srgb = 1,
56+
linear = 0,
57+
srgb = 1,
5858
};
5959
/// A struct to describe the properties of an image.
6060
struct image_descriptor {
@@ -66,7 +66,7 @@ struct image_descriptor {
6666
image_type type{image_type::standard};
6767
unsigned int num_levels{1};
6868
unsigned int array_size{1};
69-
image_color_space color_space = image_color_space::linear;
69+
image_color_space color_space = image_color_space::linear;
7070
image_descriptor() = default;
7171

7272
image_descriptor(range<1> dims, unsigned int num_channels,
@@ -133,17 +133,16 @@ struct image_descriptor {
133133
"Images must have 1, 2, 3, or 4 channels.");
134134
}
135135
if (color_space == image_color_space::srgb) {
136-
if (num_channels != 4) {
137-
throw sycl::exception(
138-
sycl::errc::invalid,
139-
"sRGB color space requires num_channels == 4");
140-
}
141-
if (channel_type != image_channel_type::unorm_int8) {
136+
if (num_channels != 4) {
137+
throw sycl::exception(sycl::errc::invalid,
138+
"sRGB color space requires num_channels == 4");
139+
}
140+
if (channel_type != image_channel_type::unorm_int8) {
142141
throw sycl::exception(
143142
sycl::errc::invalid,
144143
"sRGB color space requires unorm_int8 channel type");
144+
}
145145
}
146-
}
147146
switch (this->type) {
148147
case image_type::standard:
149148
if (this->array_size > 1) {

sycl/source/detail/bindless_images.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ void populate_ur_structs(const image_descriptor &desc, ur_image_desc_t &urDesc,
5151
urFormat = {};
5252
urFormat.channelType = sycl::detail::convertChannelType(desc.channel_type);
5353
if (desc.color_space == image_color_space::srgb) {
54-
urFormat.channelOrder = UR_IMAGE_CHANNEL_ORDER_SRGBA;
54+
urFormat.channelOrder = UR_IMAGE_CHANNEL_ORDER_SRGBA;
5555
} else {
56-
urFormat.channelOrder = sycl::detail::convertChannelOrder(
57-
sycl::ext::oneapi::experimental::detail::
58-
get_image_default_channel_order(desc.num_channels));
56+
urFormat.channelOrder = sycl::detail::convertChannelOrder(
57+
sycl::ext::oneapi::experimental::detail::
58+
get_image_default_channel_order(desc.num_channels));
5959
}
6060
}
6161

0 commit comments

Comments
 (0)