| 125 | } |
| 126 | |
| 127 | valarray<T> operator~() const |
| 128 | { |
| 129 | BOOST_STATIC_ASSERT_MSG( |
| 130 | is_fundamental<T>::value && |
| 131 | !is_floating_point<typename scalar_type<T>::type>::value, |
| 132 | "This operator can be used with all OpenCL built-in scalar" |
| 133 | " and vector types except the built-in scalar and vector float types" |
| 134 | ); |
| 135 | valarray<T> result(size()); |
| 136 | BOOST_COMPUTE_FUNCTION(T, bitwise_not, (T x), |
| 137 | { |
| 138 | return ~x; |
| 139 | }); |
| 140 | transform(begin(), end(), result.begin(), bitwise_not); |
| 141 | return result; |
| 142 | } |
| 143 | |
| 144 | /// In OpenCL there cannot be memory buffer with bool type, for |
| 145 | /// this reason return type is valarray<char> instead of valarray<bool>. |
nothing calls this directly
no test coverage detected