In OpenCL there cannot be memory buffer with bool type, for this reason return type is valarray instead of valarray . 1 means true, 0 means false.
| 145 | /// this reason return type is valarray<char> instead of valarray<bool>. |
| 146 | /// 1 means true, 0 means false. |
| 147 | valarray<char> operator!() const |
| 148 | { |
| 149 | BOOST_STATIC_ASSERT_MSG( |
| 150 | is_fundamental<T>::value, |
| 151 | "This operator can be used with all OpenCL built-in scalar" |
| 152 | " and vector types" |
| 153 | ); |
| 154 | valarray<char> result(size()); |
| 155 | BOOST_COMPUTE_FUNCTION(char, logical_not, (T x), |
| 156 | { |
| 157 | return !x; |
| 158 | }); |
| 159 | transform(begin(), end(), &result[0], logical_not); |
| 160 | return result; |
| 161 | } |
| 162 | |
| 163 | valarray<T>& operator+=(const T&); |
| 164 |
nothing calls this directly
no test coverage detected