@@ -24,6 +24,9 @@ namespace gpu {
2424// /
2525// / \ingroup sycl_esimd
2626template <typename BaseTy, typename RegionTy> class simd_view {
27+ template <typename , int > friend class simd ;
28+ template <typename , typename > friend class simd_view ;
29+
2730public:
2831 static_assert (!is_simd_view_v<BaseTy>::value);
2932 // Deduce the corresponding value type from its region type.
@@ -44,31 +47,17 @@ template <typename BaseTy, typename RegionTy> class simd_view {
4447 // / type of the base object type.
4548 using element_type = typename ShapeTy::element_type;
4649
47- // TODO @rolandschulz
48- // {quote}
49- // Why is this and the next constructor public ? Those should only be called
50- // internally by e.g.select, correct ?
51- // {/quote}
52- //
5350 // / @{
5451 // / Constructors.
52+
53+ private:
5554 simd_view (BaseTy &Base, RegionTy Region) : M_base(Base), M_region(Region) {}
5655 simd_view (BaseTy &&Base, RegionTy Region) : M_base(Base), M_region(Region) {}
5756
58- // TODO @rolandschulz
59- // {quote}
60- // Is this intentional not a correct copy constructor (would need to be const
61- // for that)? I believe we agreed that simd_view would have a deleted copy and
62- // move constructor.Why are they suddenly back ?
63- // {/quote}
64- // TODO @kbobrovs
65- // copy constructor is still incorrect (no 'const'), move constructor is still
66- // present.
67- //
68- // Disallow copy constructor for simd_view.
69- simd_view (simd_view &Other) = delete ;
70- simd_view (simd_view &&Other)
71- : M_base(Other.M_base), M_region(Other.M_region) {}
57+ public:
58+ // Disallow copy and move constructors for simd_view.
59+ simd_view (const simd_view &Other) = delete ;
60+ simd_view (simd_view &&Other) = delete ;
7261 // / @}
7362
7463 // / Conversion to simd type.
0 commit comments