◆ fill()

template<typename T , typename U >
void boost::simd::fill ( T *  first,
T *  last,
value 
)

Fill the COntiguousRange [first,last) with a given value.

Parameters
firstBeginning of the range of elements to test
lastEnd of the range of elements to fill
valuevalue to fill the range with
Requirement
Example;:
#include <boost/simd/algorithm/fill.hpp>
#include <boost/simd/function/is_gtz.hpp>
#include <iostream>
#include <vector>
int main()
{
namespace bs = boost::simd;
std::vector<float> d(7);
bs::fill( d.data(), d.data()+7,25.5f );
std::cout << "d = (" ;
for( auto e : d) std::cout << e << " ";
std::cout << ") " << std::endl;
return 0;
}
Possible output:
d = (25.5 25.5 25.5 25.5 25.5 25.5 25.5 )