Skip to content

[SYCL] image class missing "const" for certain constructor overloads. #2598

@AA11BB22

Description

@AA11BB22
/* Available only when: dimensions >1 */
  template <bool B = (Dimensions > 1)>
  image(shared_ptr_class<void> &HostPointer, image_channel_order Order,
        image_channel_type Type, const range<Dimensions> &Range,
        /* const */ typename std::enable_if<B, range<Dimensions - 1>>::type &Pitch, // Note: Missing const.
        const property_list &PropList = {}) {
    impl = std::make_shared<detail::image_impl<Dimensions>>(
        HostPointer, Order, Type, Range, Pitch,
        make_unique_ptr<detail::SYCLMemObjAllocatorHolder<AllocatorT>>(),
        PropList);
  }

  /* Available only when: dimensions >1 */
  template <bool B = (Dimensions > 1)>
  image(shared_ptr_class<void> &HostPointer, image_channel_order Order,
        image_channel_type Type, const range<Dimensions> &Range,
        /* const */ typename std::enable_if<B, range<Dimensions - 1>>::type &Pitch, // Note: Missing const.
        AllocatorT Allocator, const property_list &PropList = {}) {
    impl = std::make_shared<detail::image_impl<Dimensions>>(
        HostPointer, Order, Type, Range, Pitch,
        make_unique_ptr<detail::SYCLMemObjAllocatorHolder<AllocatorT>>(
            Allocator),
        PropList);
  }

Referenced lines:

typename std::enable_if<B, range<Dimensions - 1>>::type &Pitch,

typename std::enable_if<B, range<Dimensions - 1>>::type &Pitch,

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions