| 109 | } |
| 110 | |
| 111 | valarray<T> operator-() const |
| 112 | { |
| 113 | BOOST_STATIC_ASSERT_MSG( |
| 114 | is_fundamental<T>::value, |
| 115 | "This operator can be used with all OpenCL built-in scalar" |
| 116 | " and vector types" |
| 117 | ); |
| 118 | valarray<T> result(size()); |
| 119 | BOOST_COMPUTE_FUNCTION(T, unary_minus, (T x), |
| 120 | { |
| 121 | return -x; |
| 122 | }); |
| 123 | transform(begin(), end(), result.begin(), unary_minus); |
| 124 | return result; |
| 125 | } |
| 126 | |
| 127 | valarray<T> operator~() const |
| 128 | { |
nothing calls this directly
no test coverage detected