MCPcopy Create free account
hub / github.com/boostorg/compute / operator!

Method operator!

include/boost/compute/container/valarray.hpp:147–161  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

transformFunction · 0.85

Tested by

no test coverage detected