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

Method operator-

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

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 3

transformFunction · 0.85
BOOST_COMPUTE_FUNCTIONFunction · 0.50
beginMethod · 0.45

Tested by

no test coverage detected