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

Function BOOST_AUTO_TEST_CASE

test/test_function_input_iterator.cpp:27–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25#include "context_setup.hpp"
26
27BOOST_AUTO_TEST_CASE(generate_42_doctest)
28{
29 boost::compute::vector<int> result(4, context);
30
31//! [generate_42]
32BOOST_COMPUTE_FUNCTION(int, ret42, (),
33{
34 return 42;
35});
36
37boost::compute::copy(
38 boost::compute::make_function_input_iterator(ret42, 0),
39 boost::compute::make_function_input_iterator(ret42, result.size()),
40 result.begin(),
41 queue
42);
43
44// result == { 42, 42, 42, 42 }
45//! [generate_42]
46
47 CHECK_RANGE_EQUAL(int, 4, result, (42, 42, 42, 42));
48}
49
50BOOST_AUTO_TEST_SUITE_END()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected