Skip to content

Commit 83b07fa

Browse files
authored
Merge pull request #664 from gmlueck/gmlueck/vec-shift-constraint
Add constraint to vec <<, >> operators
2 parents dea8c1d + 64f4769 commit 83b07fa

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

adoc/chapters/programming_interface.adoc

+11-9
Original file line numberDiff line numberDiff line change
@@ -18377,15 +18377,17 @@ a@
1837718377
----
1837818378
vec operatorOP(const DataT& lhs, const vec& rhs)
1837918379
----
18380-
a@ Construct a new instance of the SYCL [code]#vec# class template with
18381-
the same template parameters as the [code]#rhs# SYCL [code]#vec#
18382-
with each element of the new SYCL [code]#vec# instance the result of
18383-
an element-wise [code]#OP# bitshift operation between the [code]#lhs# scalar and each element of the [code]#rhs# SYCL [code]#vec#.
18384-
If [code]#OP# is [code]#>>#, [code]#DataT# is a signed type
18385-
and this SYCL [code]#vec# has a negative value any vacated bits viewed
18386-
as an unsigned integer must be assigned the value [code]#1#, otherwise
18387-
any vacated bits viewed as an unsigned integer must be assigned the value
18388-
[code]#0#.
18380+
a@ Available only when: [code]#DataT != float && DataT != double && DataT != half#.
18381+
18382+
Construct a new instance of the SYCL [code]#vec# class template with
18383+
the same template parameters as the [code]#rhs# SYCL [code]#vec#
18384+
with each element of the new SYCL [code]#vec# instance the result of
18385+
an element-wise [code]#OP# bitshift operation between the [code]#lhs# scalar and each element of the [code]#rhs# SYCL [code]#vec#.
18386+
If [code]#OP# is [code]#>>#, [code]#DataT# is a signed type
18387+
and this SYCL [code]#vec# has a negative value any vacated bits viewed
18388+
as an unsigned integer must be assigned the value [code]#1#, otherwise
18389+
any vacated bits viewed as an unsigned integer must be assigned the value
18390+
[code]#0#.
1838918391

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

0 commit comments

Comments
 (0)