◆ extract()

template<typename Value , typename Offset >
scalar_of_t<Value> boost::simd::extract ( Value const &  v,
Offset const &  o 

Random-access extraction of a value subcomponent.

Extract a sub-element of a given value v

Header <boost/simd/function/extract.hpp>

For any value v of type Value and o of type Offset:

auto x = extract(v,o);

is similar to:

  • If v is a scalar value:
x = v;
  • If v is a SIMD value:
x = v[o];
vValue to extract
oPosition to extract from (offset)
The extracted value