◆ insert()

template<typename Value , typename Offset >
void boost::simd::insert ( Data &  d,
Offset const &  o,
Value const &  v 
)

Modify the value of the nth element of a mutable data.

Header <boost/simd/function/insert.hpp>
Semantic

Depending on the type of its arguments, insert exhibits different semantics. For any value v of type Value, d of type Data and o of type Offset:

insert(d, o, v);

is equivalent to:

  • If Type is a scalar type:
d = v;
  • If Type is a SIMD type:
d[o] = v;
Parameters
vValue to insert
oPosition where to insert
dData to insert into
Returns
void