Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCL] Replace constant address space with global #576

Merged
merged 5 commits into from
Sep 19, 2019

Conversation

Fznamznon
Copy link
Contributor

No description provided.

@Fznamznon Fznamznon requested a review from asavonic August 30, 2019 09:40
bader
bader previously approved these changes Sep 13, 2019
// to generic (and vise-versa). So, global address space is used here instead of
// constant to avoid incorrect address space casts in the produced device code.
// "const" qualifier is not used here because multi_ptr interface contains
// methods which return pure ElementType without qualifiers and adding const
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I follow this comment.
Can we define type alias as using type = const SYCL_GLOBAL_AS ElementType;?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think there is something to improve in the specification?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I follow this comment.
Can we define type alias as using type = const SYCL_GLOBAL_AS ElementType;?

No. I didn't add the const qualifier here because multi_ptr interface contains methods and operators which take/return pure ElementType parameter without qualifiers and address spaces. If I use the const qualifier here, I will be forced to add const_casts to these methods to remove const qualifier from underlying pointer type. So adding const qualifier here seems unnecessary.

// to generic (and vise-versa). So, global address space is used here instead of
// constant to avoid incorrect address space casts in the produced device code.
// "const" qualifier is not used here because multi_ptr interface contains
// methods which return pure ElementType without qualifiers and adding const
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think there is something to improve in the specification?

Signed-off-by: Mariya Podchishchaeva <mariya.podchishchaeva@intel.com>
Signed-off-by: Mariya Podchishchaeva <mariya.podchishchaeva@intel.com>
Signed-off-by: Mariya Podchishchaeva <mariya.podchishchaeva@intel.com>
Signed-off-by: Mariya Podchishchaeva <mariya.podchishchaeva@intel.com>
Signed-off-by: Mariya Podchishchaeva <mariya.podchishchaeva@intel.com>
@Fznamznon Fznamznon force-pushed the private/mpodchis/constas branch 2 times, most recently from 0e5acba to 814fdd3 Compare September 16, 2019 08:32
@Fznamznon
Copy link
Contributor Author

Rebased, applied suggestion

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.

4 participants