Skip to content

AllocatorT template parameter is not used in constructors of sampled_image class (unlike unsampled_image class) #119

@tizmajlo

Description

@tizmajlo

Compare the current interfaces of sampled_image and unsampled_image classes in SYCL 2020 rev 3 specification:

template <int dimensions = 1, typename AllocatorT = sycl::image_allocator>
class sampled_image {
public:
sampled_image(const void *hostPointer, image_format format,
image_sampler sampler, const range<dimensions> &rangeRef,
const property_list &propList = {});
/* Available only when: dimensions > 1 */
sampled_image(const void *hostPointer, image_format format,
image_sampler sampler, const range<dimensions> &rangeRef,
const range<dimensions -1> &pitch,
const property_list &propList = {});
sampled_image(std::shared_ptr<const void> &hostPointer, image_format format,
image_sampler sampler, const range<dimensions> &rangeRef,
const property_list &propList = {});
/* Available only when: dimensions > 1 */
sampled_image(std::shared_ptr<const void> &hostPointer, image_format format,
image_sampler sampler, const range<dimensions> &rangeRef,
const range<dimensions -1> &pitch,
const property_list &propList = {});

template <int dimensions = 1, typename AllocatorT = sycl::image_allocator>
class unsampled_image {
public:
unsampled_image(image_format format, const range<dimensions> &rangeRef,
const property_list &propList = {});
unsampled_image(image_format format, const range<dimensions> &rangeRef,
AllocatorT allocator, const property_list &propList = {});
/* Available only when: dimensions > 1 */
unsampled_image(image_format format, const range<dimensions> &rangeRef,
const range<dimensions -1> &pitch,
const property_list &propList = {});
/* Available only when: dimensions > 1 */
unsampled_image(image_format format, const range<dimensions> &rangeRef,
const range<dimensions -1> &pitch, AllocatorT allocator,
const property_list &propList = {});
unsampled_image(void *hostPointer, image_format format,
const range<dimensions> &rangeRef,
const property_list &propList = {});
unsampled_image(void *hostPointer, image_format format,
const range<dimensions> &rangeRef, AllocatorT allocator,
const property_list &propList = {});
/* Available only when: dimensions > 1 */
unsampled_image(void *hostPointer, image_format format,
const range<dimensions> &rangeRef,
const range<dimensions -1> &pitch,
const property_list &propList = {});
/* Available only when: dimensions > 1 */
unsampled_image(void *hostPointer, image_format format,
const range<dimensions> &rangeRef,
const range<dimensions -1> &pitch, AllocatorT allocator,
const property_list &propList = {});
unsampled_image(std::shared_ptr<void> &hostPointer, image_format format,
const range<dimensions> &rangeRef,
const property_list &propList = {});
unsampled_image(std::shared_ptr<void> &hostPointer, image_format format,
const range<dimensions> &rangeRef, AllocatorT allocator,
const property_list &propList = {});
/* Available only when: dimensions > 1 */
unsampled_image(std::shared_ptr<void> &hostPointer, image_format format,
const range<dimensions> &rangeRef,
const range<dimensions -1> &pitch,
const property_list &propList = {});
/* Available only when: dimensions > 1 */
unsampled_image(std::shared_ptr<void> &hostPointer, image_format format,
const range<dimensions> &rangeRef,
const range<dimensions -1> &pitch, AllocatorT allocator,
const property_list &propList = {});

Both of them have AllocatorT template type parameter that is a type of an allocator used by the corresponding class. But no allocators of the given type can be passed to the constructors of an object of sampled_image class (unlike unsampled_image class). It looks like a bug in the specification.

Metadata

Metadata

Assignees

No one assigned

    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