Skip to content

[SYCL][DOC] Update sycl_ext_oneapi_prefetch#11835

Merged
againull merged 2 commits intointel:syclfrom
KornevNikita:update-prefetch-spec
Nov 10, 2023
Merged

[SYCL][DOC] Update sycl_ext_oneapi_prefetch#11835
againull merged 2 commits intointel:syclfrom
KornevNikita:update-prefetch-spec

Conversation

@KornevNikita
Copy link
Contributor

The compiler treats such code:

prefetch(ptr, 8)

as call to void prefetch(void ptr, Properties properties = {}), instead of void prefetch(T ptr, size_t count, Properties properties = {});

Adding constraints to avoid this.

The compiler treats such code:

  prefetch(ptr, 8)

as call to void prefetch(void *ptr, Properties properties = {}),
instead of void prefetch(T* ptr, size_t count, Properties properties = {});

Adding constraints to avoid this.
@KornevNikita KornevNikita requested a review from a team as a code owner November 9, 2023 11:04
@KornevNikita
Copy link
Contributor Author

KornevNikita commented Nov 9, 2023

Not sure how this constraint should be added. Is it okay to add just like Note?
Or it should be added as a comment in API example / Constraints string in every method description?

@gmlueck
Copy link
Contributor

gmlueck commented Nov 9, 2023

Or it should be added as a comment in API example / Constraints string in every method description?

It should be added as a Constraints: paragraph on every function. For example, see how the joint_prefetch functions all have a paragraph:

Constraints: Available only if sycl::is_group_v<std::decay_t> is true.

The Constraints: paragraph should precede Preconditions: and Effects:.

@againull againull merged commit 73e8bd4 into intel:sycl Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants