Skip to content

Commit 9035cdb

Browse files
[SYCL] Add SYCL 2020 image classes (#9308)
This commit adds the SYCL 2020 image classes sampled_image and unsampled_image, together with their constituents. The implementation leverages the implementation of the existing SYCL 1.2.1 image class. Since the corresponding accessor classes are still to be added, this commit does not include the `get_access` member functions. --------- Signed-off-by: Larsen, Steffen <[email protected]>
1 parent fa89b05 commit 9035cdb

File tree

16 files changed

+1177
-58
lines changed

16 files changed

+1177
-58
lines changed

sycl/include/sycl/access/access.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ enum class decorated : int { no = 0, yes = 1, legacy = 2 };
6262
using access::target;
6363
using access_mode = access::mode;
6464

65+
enum class image_target : unsigned int { device = 0, host_task = 1 };
66+
6567
template <access_mode mode> struct mode_tag_t {
6668
explicit mode_tag_t() = default;
6769
};

sycl/include/sycl/ext/oneapi/owner_less.hpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <sycl/device.hpp>
1616
#include <sycl/event.hpp>
1717
#include <sycl/ext/oneapi/weak_object.hpp>
18+
#include <sycl/image.hpp>
1819
#include <sycl/kernel.hpp>
1920
#include <sycl/kernel_bundle.hpp>
2021
#include <sycl/platform.hpp>
@@ -76,6 +77,15 @@ template <typename DataT, int Dimensions, typename AllocatorT>
7677
struct owner_less<buffer<DataT, Dimensions, AllocatorT>>
7778
: public detail::owner_less_base<buffer<DataT, Dimensions, AllocatorT>> {};
7879

80+
template <int Dimensions, typename AllocatorT>
81+
struct owner_less<unsampled_image<Dimensions, AllocatorT>>
82+
: public detail::owner_less_base<unsampled_image<Dimensions, AllocatorT>> {
83+
};
84+
85+
template <int Dimensions, typename AllocatorT>
86+
struct owner_less<sampled_image<Dimensions, AllocatorT>>
87+
: public detail::owner_less_base<sampled_image<Dimensions, AllocatorT>> {};
88+
7989
template <typename DataT, int Dimensions, access_mode AccessMode,
8090
target AccessTarget, access::placeholder isPlaceholder>
8191
struct owner_less<

0 commit comments

Comments
 (0)