MCPcopy Create free account
hub / github.com/boostorg/compute / generate

Function generate

include/boost/compute/algorithm/generate.hpp:31–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29/// Space complexity: \Omega(1)
30template<class OutputIterator, class Generator>
31inline void generate(OutputIterator first,
32 OutputIterator last,
33 Generator generator,
34 command_queue &queue = system::default_queue())
35{
36 BOOST_STATIC_ASSERT(is_device_iterator<OutputIterator>::value);
37 size_t count = detail::iterator_range_size(first, last);
38 if(count == 0){
39 return;
40 }
41
42 ::boost::compute::copy(
43 ::boost::compute::make_function_input_iterator(generator,
44 first.get_index()),
45 ::boost::compute::make_function_input_iterator(generator,
46 last.get_index()),
47 first,
48 queue
49 );
50}
51
52} // end compute namespace
53} // end boost namespace

Callers 15

generate_nFunction · 0.70
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
BOOST_AUTO_TEST_CASEFunction · 0.50
BOOST_AUTO_TEST_CASEFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50

Calls 4

iterator_range_sizeFunction · 0.85
copyFunction · 0.85
get_indexMethod · 0.45

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.40
BOOST_AUTO_TEST_CASEFunction · 0.40