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

Add constraint to vec <<, >> operators #664

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions adoc/chapters/programming_interface.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18326,15 +18326,17 @@ a@
----
vec operatorOP(const DataT& lhs, const vec& rhs)
----
a@ Construct a new instance of the SYCL [code]#vec# class template with
the same template parameters as the [code]#rhs# SYCL [code]#vec#
with each element of the new SYCL [code]#vec# instance the result of
an element-wise [code]#OP# bitshift operation between the [code]#lhs# scalar and each element of the [code]#rhs# SYCL [code]#vec#.
If [code]#OP# is [code]#>>#, [code]#DataT# is a signed type
and this SYCL [code]#vec# has a negative value any vacated bits viewed
as an unsigned integer must be assigned the value [code]#1#, otherwise
any vacated bits viewed as an unsigned integer must be assigned the value
[code]#0#.
a@ Available only when: [code]#DataT != float && DataT != double && DataT != half#.

Construct a new instance of the SYCL [code]#vec# class template with
the same template parameters as the [code]#rhs# SYCL [code]#vec#
with each element of the new SYCL [code]#vec# instance the result of
an element-wise [code]#OP# bitshift operation between the [code]#lhs# scalar and each element of the [code]#rhs# SYCL [code]#vec#.
If [code]#OP# is [code]#>>#, [code]#DataT# is a signed type
and this SYCL [code]#vec# has a negative value any vacated bits viewed
as an unsigned integer must be assigned the value [code]#1#, otherwise
any vacated bits viewed as an unsigned integer must be assigned the value
[code]#0#.

Where [code]#OP# is: [code]#<<#, [code]#>>#.

Expand Down