diff --git a/adoc/chapters/programming_interface.adoc b/adoc/chapters/programming_interface.adoc index eeea92733..8e5bd318a 100644 --- a/adoc/chapters/programming_interface.adoc +++ b/adoc/chapters/programming_interface.adoc @@ -17889,7 +17889,7 @@ The number of elements parameter, [code]#NumElements#, must be one of: 1, 2, 3, Any other value shall produce a compilation failure. The element type parameter, [code]#DataT#, must be the cv-unqualified version of one of the following: one of the built-in scalar data types listed in -<>, [code]#half#, or [code]#sycl::byte#. +<>, [code]#half#, [code]#sycl::byte#, or [code]#std::byte#. The SYCL [code]#vec# class template provides interoperability with the underlying vector type defined by [code]#vector_t# which is available only when @@ -18278,7 +18278,11 @@ a@ ---- vec operatorOP(const vec& lhs, const vec& rhs) ---- - a@ If [code]#OP# is [code]#%#, available only when: [code]#DataT != float && DataT != double && DataT != half#. +a@ _Constraints:_ + +* If [code]#OP# is not [code]#%#, [code]#DataT# is an arithmetic type or + [code]#half#, and +* If [code]#OP# is [code]#%#, [code]#DataT# is an integral type. Construct a new instance of the SYCL [code]#vec# class template with the same template parameters as [code]#lhs# [code]#vec# with each element of the new SYCL [code]#vec# instance the result of an element-wise [code]#OP# arithmetic operation between each element of [code]#lhs# [code]#vec# and each element of the [code]#rhs# SYCL [code]#vec#. @@ -18293,7 +18297,9 @@ vec operatorOP(const vec& lhs, const T& rhs) a@ _Constraints:_ * [code]#T# is implicitly convertible to [code]#DataT#, and -* If [code]#OP# is [code]#%#, [code]#DataT != float && DataT != double && DataT != half#. +* If [code]#OP# is not [code]#%#, [code]#DataT# is an arithmetic type or + [code]#half#, and +* If [code]#OP# is [code]#%#, [code]#DataT# is an integral type. Construct a new instance of the SYCL [code]#vec# class template with the same template parameters as [code]#lhs# [code]#vec# with each element of the new SYCL [code]#vec# instance the result of an element-wise [code]#OP# arithmetic operation between each element of [code]#lhs# [code]#vec# and the [code]#rhs# scalar. @@ -18308,7 +18314,9 @@ vec operatorOP(const T& lhs, const vec& rhs) a@ _Constraints:_ * [code]#T# is implicitly convertible to [code]#DataT#, and -* If [code]#OP# is [code]#%#, [code]#DataT != float && DataT != double && DataT != half#. +* If [code]#OP# is not [code]#%#, [code]#DataT# is an arithmetic type or + [code]#half#, and +* If [code]#OP# is [code]#%#, [code]#DataT# is an integral type. Construct a new instance of the SYCL [code]#vec# class template with the same template parameters as the [code]#rhs# SYCL [code]#vec# @@ -18325,7 +18333,11 @@ a@ ---- vec& operatorOP(vec& lhs, const vec& rhs) ---- - a@ If [code]#OP# is [code]#%=#, available only when: [code]#DataT != float && DataT != double && DataT != half#. +a@ _Constraints:_ + +* If [code]#OP# is not [code]#%=#, [code]#DataT# is an arithmetic type or + [code]#half#, and +* If [code]#OP# is [code]#%=#, [code]#DataT# is an integral type. Perform an in-place element-wise [code]#OP# arithmetic operation between each element of [code]#lhs# [code]#vec# and each element of the [code]#rhs# SYCL [code]#vec# and return [code]#lhs# [code]#vec#. @@ -18340,7 +18352,9 @@ vec& operatorOP(vec& lhs, const T& rhs) a@ _Constraints:_ * [code]#T# is implicitly convertible to [code]#DataT#, and -* If [code]#OP# is [code]#%=#, [code]#DataT != float && DataT != double && DataT != half#. +* If [code]#OP# is not [code]#%=#, [code]#DataT# is an arithmetic type or + [code]#half#, and +* If [code]#OP# is [code]#%=#, [code]#DataT# is an integral type. Perform an in-place element-wise [code]#OP# arithmetic operation between each element of [code]#lhs# [code]#vec# and [code]#rhs# scalar and return [code]#lhs# [code]#vec#. @@ -18351,7 +18365,8 @@ a@ ---- vec& operatorOP(vec& v) ---- - a@ Available only when: [code]#DataT != bool#. +a@ _Constraints:_ [code]#DataT# is an arithmetic type or [code]#half# but +[code]#DataT# is not [code]#bool#. Perform an in-place element-wise [code]#OP# prefix arithmetic operation on each element of [code]#v# and return [code]#v#. @@ -18362,7 +18377,8 @@ a@ ---- vec operatorOP(vec& v, int) ---- - a@ Available only when: [code]#DataT != bool#. +a@ _Constraints:_ [code]#DataT# is an arithmetic type or [code]#half# but +[code]#DataT# is not [code]#bool#. Perform an in-place element-wise [code]#OP# postfix arithmetic operation on each element of [code]#v# and return a copy of [code]#v# before the operation is performed. @@ -18373,7 +18389,9 @@ a@ ---- vec operatorOP(const vec& v) ---- - a@ Construct a new instance of the SYCL [code]#vec# class template with the same template parameters as this SYCL [code]#vec# with each element of the new SYCL [code]#vec# instance the result of an element-wise [code]#OP# unary arithmetic operation on each element of this SYCL [code]#vec#. +a@ _Constraints:_ [code]#DataT# is an arithmetic type or [code]#half#. + +Construct a new instance of the SYCL [code]#vec# class template with the same template parameters as this SYCL [code]#vec# with each element of the new SYCL [code]#vec# instance the result of an element-wise [code]#OP# unary arithmetic operation on each element of this SYCL [code]#vec#. Where [code]#OP# is: [code]#pass:[+]#, [code]#-#. @@ -18382,7 +18400,7 @@ a@ ---- vec operatorOP(const vec& lhs, const vec& rhs) ---- - a@ Available only when: [code]#DataT != float && DataT != double && DataT != half#. +a@ _Constraints:_ [code]#DataT# is an integral type or [code]#std::byte#. Construct a new instance of the SYCL [code]#vec# class template with the same template parameters as [code]#lhs# [code]#vec# with each element of the new SYCL [code]#vec# instance the result of an element-wise [code]#OP# bitwise operation between each element of [code]#lhs# [code]#vec# and each element of the [code]#rhs# SYCL [code]#vec#. @@ -18397,7 +18415,7 @@ vec operatorOP(const vec& lhs, const T& rhs) a@ _Constraints:_ * [code]#T# is implicitly convertible to [code]#DataT#, and -* [code]#DataT != float && DataT != double && DataT != half#. +* [code]#DataT# is an integral type or [code]#std::byte#. Construct a new instance of the SYCL [code]#vec# class template with the same template parameters as [code]#lhs# [code]#vec# with each element of the new SYCL [code]#vec# instance the result of an element-wise [code]#OP# bitwise operation between each element of [code]#lhs# [code]#vec# and the [code]#rhs# scalar. @@ -18412,7 +18430,7 @@ vec operatorOP(const T& lhs, const vec& rhs) a@ _Constraints:_ * [code]#T# is implicitly convertible to [code]#DataT#, and -* [code]#DataT != float && DataT != double && DataT != half#. +* [code]#DataT# is an integral type or [code]#std::byte#. Construct a new instance of the SYCL [code]#vec# class template with the same template parameters as the [code]#rhs# SYCL [code]#vec# @@ -18426,7 +18444,7 @@ a@ ---- vec& operatorOP(vec& lhs, const vec& rhs) ---- - a@ Available only when: [code]#DataT != float && DataT != double && DataT != half#. +a@ _Constraints:_ [code]#DataT# is an integral type or [code]#std::byte#. Perform an in-place element-wise [code]#OP# bitwise operation between each element of [code]#lhs# [code]#vec# and the [code]#rhs# SYCL [code]#vec# and return [code]#lhs# [code]#vec#. @@ -18441,7 +18459,7 @@ vec& operatorOP(vec& lhs, const T& rhs) a@ _Constraints:_ * [code]#T# is implicitly convertible to [code]#DataT#, and -* [code]#DataT != float && DataT != double && DataT != half#. +* [code]#DataT# is an integral type or [code]#std::byte#. Perform an in-place element-wise [code]#OP# bitwise operation between each element of [code]#lhs# [code]#vec# and the [code]#rhs# scalar and return a [code]#lhs# [code]#vec#. @@ -18452,7 +18470,7 @@ a@ ---- vec operatorOP(const vec& lhs, const vec& rhs) ---- - a@ Available only when: [code]#DataT != float && DataT != double && DataT != half#. +a@ _Constraints:_ [code]#DataT# is an integral type. Construct a new instance of the SYCL [code]#vec# class template with the same template parameters as [code]#lhs# [code]#vec# with each element of the new SYCL [code]#vec# instance the result of an element-wise [code]#OP# bitshift operation between each element of [code]#lhs# [code]#vec# and each element of the [code]#rhs# SYCL [code]#vec#. If [code]#OP# is [code]#>>#, [code]#DataT# is a signed type and [code]#lhs# [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#. @@ -18467,7 +18485,7 @@ vec operatorOP(const vec& lhs, const T& rhs) a@ _Constraints:_ * [code]#T# is implicitly convertible to [code]#DataT#, and -* [code]#DataT != float && DataT != double && DataT != half#. +* [code]#DataT# is an integral type. Construct a new instance of the SYCL [code]#vec# class template with the same template parameters as [code]#lhs# [code]#vec# with each element of the new SYCL [code]#vec# instance the result of an element-wise [code]#OP# bitshift operation between each element of [code]#lhs# [code]#vec# and the [code]#rhs# scalar. If [code]#OP# is [code]#>>#, [code]#DataT# is a signed type and [code]#lhs# [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#. @@ -18482,7 +18500,7 @@ vec operatorOP(const T& lhs, const vec& rhs) a@ _Constraints:_ * [code]#T# is implicitly convertible to [code]#DataT#, and -* [code]#DataT != float && DataT != double && DataT != half#. +* [code]#DataT# is an integral type. Construct a new instance of the SYCL [code]#vec# class template with the same template parameters as the [code]#rhs# SYCL [code]#vec# @@ -18501,7 +18519,7 @@ a@ ---- vec& operatorOP(vec& lhs, const vec& rhs) ---- - a@ Available only when: [code]#DataT != float && DataT != double && DataT != half#. +a@ _Constraints:_ [code]#DataT# is an integral type. Perform an in-place element-wise [code]#OP# bitshift operation between each element of [code]#lhs# [code]#vec# and the [code]#rhs# SYCL [code]#vec# and returns [code]#lhs# [code]#vec#. If [code]#OP# is [code]#>>=#, [code]#DataT# is a signed type and [code]#lhs# [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#. @@ -18516,7 +18534,7 @@ vec& operatorOP(vec& lhs, const T& rhs) a@ _Constraints:_ * [code]#T# is implicitly convertible to [code]#DataT#, and -* [code]#DataT != float && DataT != double && DataT != half#. +* [code]#DataT# is an integral type. Perform an in-place element-wise [code]#OP# bitshift operation between each element of [code]#lhs# [code]#vec# and the [code]#rhs# scalar and returns a reference to this SYCL [code]#vec#. If [code]#OP# is [code]#>>=#, [code]#DataT# is a signed type and [code]#lhs# [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#. @@ -18527,7 +18545,9 @@ a@ ---- vec operatorOP(const vec& lhs, const vec& rhs) ---- - a@ Construct a new instance of the SYCL [code]#vec# class template with the same template parameters as [code]#lhs# [code]#vec# with each element of the new SYCL [code]#vec# instance the result of an element-wise [code]#OP# logical operation between each element of [code]#lhs# [code]#vec# and each element of the [code]#rhs# SYCL [code]#vec#. +a@ _Constraints:_ [code]#DataT# is an arithmetic type or [code]#half#. + +Construct a new instance of the SYCL [code]#vec# class template with the same template parameters as [code]#lhs# [code]#vec# with each element of the new SYCL [code]#vec# instance the result of an element-wise [code]#OP# logical operation between each element of [code]#lhs# [code]#vec# and each element of the [code]#rhs# SYCL [code]#vec#. The [code]#DataT# template parameter of the constructed SYCL [code]#vec#, [code]#RET#, varies depending on the [code]#DataT# template parameter of this SYCL [code]#vec#. For a SYCL [code]#vec# with [code]#DataT# of type [code]#int8_t# or [code]#uint8_t# [code]#RET# must be [code]#int8_t#. For a SYCL [code]#vec# with [code]#DataT# of type [code]#int16_t#, [code]#uint16_t# or [code]#half# [code]#RET# must be [code]#int16_t#. For a SYCL [code]#vec# with [code]#DataT# of type [code]#int32_t#, [code]#uint32_t# or [code]#float# [code]#RET# must be [code]#int32_t#. For a SYCL [code]#vec# with [code]#DataT# of type [code]#int64_t#, [code]#uint64_t# or [code]#double# [code]#RET# must be [code]#int64_t#. @@ -18539,7 +18559,10 @@ a@ template vec operatorOP(const vec& lhs, const T& rhs) ---- -a@ _Constraints:_ [code]#T# is implicitly convertible to [code]#DataT#. +a@ _Constraints:_ + +* [code]#T# is implicitly convertible to [code]#DataT#, and +* [code]#DataT# is an arithmetic type or [code]#half#. Construct a new instance of the SYCL [code]#vec# class template with the same template parameters as this SYCL [code]#vec# with each element of the new SYCL [code]#vec# instance the result of an element-wise [code]#OP# logical operation between each element of [code]#lhs# [code]#vec# and the [code]#rhs# scalar. @@ -18553,7 +18576,10 @@ a@ template vec operatorOP(const T& lhs, const vec& rhs) ---- -a@ _Constraints:_ [code]#T# is implicitly convertible to [code]#DataT#. +a@ _Constraints:_ + +* [code]#T# is implicitly convertible to [code]#DataT#, and +* [code]#DataT# is an arithmetic type or [code]#half#. Construct a new instance of the SYCL [code]#vec# class template with the same template parameters as the [code]#rhs# SYCL [code]#vec# @@ -18628,7 +18654,7 @@ a@ ---- vec operator~(const vec& v) ---- - a@ Available only when: [code]#DataT != float && DataT != double && DataT != half#. +a@ _Constraints:_ [code]#DataT# is an integral type or [code]#std::byte#. Construct a new instance of the SYCL [code]#vec# class template with the same template parameters as [code]#v# [code]#vec# with each element of the new SYCL [code]#vec# instance the result of an element-wise bitwise NOT operation on each element of [code]#v# [code]#vec#. @@ -18637,7 +18663,9 @@ a@ ---- vec operator!(const vec& v) ---- - a@ Construct a new instance of the SYCL [code]#vec# class template with the same template parameters as [code]#v# [code]#vec# with each element of the new SYCL [code]#vec# instance the result of an element-wise logical NOT operation on each element of [code]#v# [code]#vec#. Each element of the SYCL [code]#vec# that is returned must be [code]#-1# if the operation results in [code]#true# and [code]#0# if the operation results in [code]#false# or this SYCL [code]#vec# is a NaN. +a@ _Constraints:_ [code]#DataT# is an arithmetic type or [code]#half#. + +Construct a new instance of the SYCL [code]#vec# class template with the same template parameters as [code]#v# [code]#vec# with each element of the new SYCL [code]#vec# instance the result of an element-wise logical NOT operation on each element of [code]#v# [code]#vec#. Each element of the SYCL [code]#vec# that is returned must be [code]#-1# if the operation results in [code]#true# and [code]#0# if the operation results in [code]#false# or this SYCL [code]#vec# is a NaN. The [code]#DataT# template parameter of the constructed SYCL [code]#vec#, [code]#RET#, varies depending on the [code]#DataT# template parameter of this SYCL [code]#vec#. For a SYCL [code]#vec# with [code]#DataT# of type [code]#int8_t# or [code]#uint8_t# [code]#RET# must be [code]#int8_t#. For a SYCL [code]#vec# with [code]#DataT# of type [code]#int16_t#, [code]#uint16_t# or [code]#half# [code]#RET# must be [code]#int16_t#. For a SYCL [code]#vec# with [code]#DataT# of type [code]#int32_t#, [code]#uint32_t# or [code]#float# [code]#RET# must be [code]#int32_t#. For a SYCL [code]#vec# with [code]#DataT# of type [code]#int64_t#, [code]#uint64_t# or [code]#double# [code]#RET# must be [code]#int64_t#. @@ -19163,18 +19191,20 @@ friends of [code]#+__writeable_swizzle__+#. Overloads (4), (6), (8), (10), and (12) are hidden friends of [code]#+__const_swizzle__+#. -_Constraints:_ If [code]#OP# is one of the following: [code]#%#, [code]#&#, -[code]#|#, [code]#^#, [code]#<<#, [code]#>>#; available only when: [code]#DataT -!= float && DataT != double && DataT != half#. - -Overloads (1) - (4) are available only when the element data type of [code]#lhs# -is the same as the element data type of [code]#rhs# and when the number of -elements in the [code]#lhs# view is equal to the number of elements in the -[code]#rhs# view. - -Overloads (9) - (12) are available only when [code]#T# is implicitly convertible -to [code]#DataT# and when [code]#T# is not one of the swizzled vector class -templates. +_Constraints:_ + +* If [code]#OP# is [code]#pass:[+]#, [code]#-#, [code]#*#, [code]#/#; + [code]#DataT# is an arithmetic type or [code]#half#, and +* If [code]#OP# is [code]#%#, [code]#<<#, [code]#>>#; [code]#DataT# is an + integral type, and +* If [code]#OP# is [code]#&#, [code]#|#, [code]#^#; [code]#DataT# is an integral + type or [code]#std::byte#, and +* For overloads (1) - (4), the element data type of [code]#lhs# is the same as + the element data type of [code]#rhs# and the number of elements in the + [code]#lhs# view is equal to the number of elements in the [code]#rhs# view, + and +* For overloads (9) - (12), [code]#T# is implicitly convertible to [code]#DataT# + and [code]#T# is not one of the swizzled vector class templates. _Effects:_ These functions behave as though the swizzle operation represented by each [code]#+__writeable_swizzle__+# or [code]#+__const_swizzle__+# parameter @@ -19214,21 +19244,22 @@ Where [code]#OP# is: [code]#pass:[+=]#, [code]#-=#, [code]#*=#, [code]#/=#, _Availability:_ These are hidden friend functions only in [code]#+__writeable_swizzle__+#. -_Constraints:_ Available only when the left hand side -[code]#+__writeable_swizzle__+# view does not contain any repeated elements. - -If [code]#OP# is one of the following: [code]#%=#, [code]#&=#, [code]#|=#, -[code]#^=#, [code]#+<<=+#, [code]#>>=#; available only when: [code]#DataT != -float && DataT != double && DataT != half#. - -Overloads (1) and (2) are available only when the element data type of -[code]#lhs# is the same as the element data type of [code]#rhs# and when the -number of elements in the [code]#lhs# view is equal to the number of elements in -the [code]#rhs# view. - -Overloads (4) is available only when [code]#T# is implicitly convertible to -[code]#DataT# and when [code]#T# is not one of the swizzled vector class -templates. +_Constraints:_ + +* The left hand side [code]#+__writeable_swizzle__+# view does not contain any + repeated elements, and +* If [code]#OP# is [code]#pass:[+=]#, [code]#-=#, [code]#*=#, [code]#/=#; + [code]#DataT# is an arithmetic type or [code]#half#, and +* If [code]#OP# is [code]#%=#, [code]#+<<=+#, [code]#>>=#; [code]#DataT# is an + integral type, and +* If [code]#OP# is [code]#&=#, [code]#|=#, [code]#^=#; [code]#DataT# is an + integral type or [code]#std::byte#, and +* For overloads (1) and (2), the element data type of [code]#lhs# is the same as + the element data type of [code]#rhs# and the number of elements in the + [code]#lhs# view is equal to the number of elements in the [code]#rhs# view, + and +* For overload (4), [code]#T# is implicitly convertible to [code]#DataT# and + [code]#T# is not one of the swizzled vector class templates. _Effects:_ These functions operate as follow. @@ -19264,9 +19295,12 @@ Where [code]#OP# is: [code]#pass:[++]#, [code]#--#. _Availability:_ These are hidden friend functions only in [code]#+__writeable_swizzle__+#. -_Constraints:_ Available only when the [code]#+__writeable_swizzle__+# view does -not contain any repeated elements. -Available only when [code]#DataT# is not [code]#bool#. +_Constraints:_ + +* The [code]#+__writeable_swizzle__+# view does not contain any repeated + elements, and +* [code]#DataT# is an arithmetic type or [code]#half# but [code]#DataT# is not + [code]#bool#. _Effects:_ Perform an in-place element-wise [code]#OP# prefix arithmetic operation on those elements of the [code]#vec# object that have corresponding @@ -19291,9 +19325,12 @@ Where [code]#OP# is: [code]#pass:[++]#, [code]#--#. _Availability:_ These are hidden friend functions only in [code]#+__writeable_swizzle__+#. -_Constraints:_ Available only when the [code]#+__writeable_swizzle__+# view does -not contain any repeated elements. -Available only when [code]#DataT# is not [code]#bool#. +_Constraints:_ + +* The [code]#+__writeable_swizzle__+# view does not contain any repeated + elements, and +* [code]#DataT# is an arithmetic type or [code]#half# but [code]#DataT# is not + [code]#bool#. _Effects:_ Perform an in-place element-wise [code]#OP# postfix arithmetic operation on those elements of the [code]#vec# object that have corresponding @@ -19322,6 +19359,8 @@ _Availability:_ Functions (1) are hidden friends in [code]#+__writeable_swizzle__+#. Functions (2) are hidden friends in [code]#+__const_swizzle__+#. +_Constraints:_ [code]#DataT# is an arithmetic type or [code]#half#. + _Effects:_ These functions behave as though the swizzle operation represented by the [code]#sv# parameter was first evaluated into a temporary [code]#vec# object, and then [code]#operatorOP# was applied to the temporary [code]#vec# @@ -19392,14 +19431,17 @@ friends of [code]#+__writeable_swizzle__+#. Overloads (4), (6), (8), (10), and (12) are hidden friends of [code]#+__const_swizzle__+#. -_Constraints:_ Overloads (1) - (4) are available only when the element data type -of [code]#lhs# is the same as the element data type of [code]#rhs# and when the -number of elements in the [code]#lhs# view is equal to the number of elements in -the [code]#rhs# view. +_Constraints:_ -Overloads (9) - (12) are available only when [code]#T# is implicitly convertible -to [code]#DataT# and when [code]#T# is not one of the swizzled vector class -templates. +* For overloads (1) - (4), the element data type of [code]#lhs# is the same as + the element data type of [code]#rhs# and the number of elements in the + [code]#lhs# view is equal to the number of elements in the [code]#rhs# view, + and +* If [code]#OP# is [code]#&&#, [code]#||#; [code]#DataT# is an arithmetic type + or [code]#half#, and +* For overloads (9) - (12), available only when [code]#T# is implicitly + convertible to [code]#DataT# and [code]#T# is not one of the swizzled vector + class templates. _Effects:_ These functions behave as though the swizzle operation represented by each [code]#+__writeable_swizzle__+# or [code]#+__const_swizzle__+# parameter @@ -19426,8 +19468,11 @@ _Availability:_ Overloads (1) and (3) are hidden friends of [code]#+__writeable_swizzle__+#. Overloads (2) and (4) are hidden friends of [code]#+__const_swizzle__+#. -_Constraints:_ Overloads (1) - (2) are available only when: [code]#DataT != -float && DataT != double && DataT != half#. +_Constraints:_ + +* For overloads (1) - (2), [code]#DataT# is an integral type or + [code]#std::byte#, and +* For overloads (3) - (4), [code]#DataT# is an arithmetic type or [code]#half#. _Effects:_ These functions behave as though the swizzle operation represented by the [code]#+__writeable_swizzle__+# or [code]#+__const_swizzle__+# parameter was diff --git a/adoc/headers/vec.h b/adoc/headers/vec.h index 59a9c30c3..e006b8ebd 100644 --- a/adoc/headers/vec.h +++ b/adoc/headers/vec.h @@ -149,7 +149,8 @@ template class vec { // OP is: +, -, *, /, % // // Available only when: T is convertible to DataT - // If OP is %, available only when: DataT != float && DataT != double && DataT != half + // If OP is not %, available only when DataT is an arithmetic type or half. + // If OP is %, available only when DataT is an integral type. friend vec operatorOP(const vec& lhs, const vec& rhs); template @@ -161,7 +162,8 @@ template class vec { // OP is: +=, -=, *=, /=, %= // // Available only when: T is convertible to DataT - // If OP is %=, available only when: DataT != float && DataT != double && DataT != half + // If OP is not %=, available only when DataT is an arithmetic type or half. + // If OP is %=, available only when DataT is an integral type. friend vec& operatorOP(vec& lhs, const vec& rhs); template @@ -169,21 +171,25 @@ template class vec { // OP is prefix ++, -- // - // Available only when: DataT != bool + // Available only when DataT is an arithmetic type or half but not when DataT + // is bool. friend vec& operatorOP(vec& rhs); // OP is postfix ++, -- // - // Available only when: DataT != bool + // Available only when DataT is an arithmetic type or half but not when DataT + // is bool. friend vec operatorOP(vec& lhs, int); // OP is unary +, - + // + // Available only when DataT is an arithmetic type or half. friend vec operatorOP(const vec& rhs); // OP is: &, |, ^ // // Available only when: T is convertible to DataT - // Available only when: DataT != float && DataT != double && DataT != half + // Available only when DataT is an integral type or std::byte. friend vec operatorOP(const vec& lhs, const vec& rhs); template @@ -195,7 +201,7 @@ template class vec { // OP is: &=, |=, ^= // // Available only when: T is convertible to DataT - // Available only when: DataT != float && DataT != double && DataT != half + // Available only when DataT is an integral type or std::byte. friend vec& operatorOP(vec& lhs, const vec& rhs); template @@ -204,7 +210,7 @@ template class vec { // OP is: <<, >> // // Available only when: T is convertible to DataT - // Available only when: DataT != float && DataT != double && DataT != half + // Available only when DataT is an integral type. friend vec operatorOP(const vec& lhs, const vec& rhs); template @@ -216,7 +222,7 @@ template class vec { // OP is: <<=, >>= // // Available only when: T is convertible to DataT - // Available only when: DataT != float && DataT != double && DataT != half + // Available only when DataT is an integral type. friend vec& operatorOP(vec& lhs, const vec& rhs); template @@ -225,6 +231,7 @@ template class vec { // OP is: &&, || // // Available only when: T is convertible to DataT + // Available only when DataT is an arithmetic type or half. friend vec operatorOP(const vec& lhs, const vec& rhs); template @@ -244,9 +251,10 @@ template class vec { template friend vec operatorOP(const T& lhs, const vec& rhs); - // Available only when: DataT != float && DataT != double && DataT != half + // Available only when DataT is an integral type or std::byte. friend vec operator~(const vec& v); + // Available only when DataT is an arithmetic type or half. friend vec operator!(const vec& v); };