Skip to content

Do we really need distinct image and buffer properties? #892

@AlexeySachkov

Description

@AlexeySachkov

Specification Version

SYCL 2020 (Revision 10)

Section Number(s)

Issue Description

This was prompted by me working on #814. I realized that buffer and [sampled|unsampled]_image classes accept the same set of properties, but those properties are actually defined twice within different namespaces. I.e. we have sycl::property::buffer::use_mutex and sycl::property::image::use_mutex.

Why do we have them defined twice? They seem to be doing the same thing, just for a different class. Moreover, 4.7.2.2. Buffer properties says:

The use_mutex property is valid for the SYCL buffer, unsampled_image and sampled_image classes.

However, 4.7.3.3. Image properties says:

The properties that can be provided when constructing the SYCL unsampled_image and sampled_image classes are described in Table 30.

As if buffer::use_mutex cannot be used together with unsampled_image. So, which is it?

Should we maybe deprecate both and document those properties once within sycl::property like it is done for no_init (4.7.6.4. Properties)?

Code Example (Optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions