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

Function BOOST_AUTO_TEST_CASE

test/test_linear_congruential_engine.cpp:20–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18#include "context_setup.hpp"
19
20BOOST_AUTO_TEST_CASE(generate_uint)
21{
22 using boost::compute::uint_;
23
24 boost::compute::linear_congruential_engine<uint_> rng(queue);
25
26 boost::compute::vector<uint_> vector(10, context);
27
28 rng.generate(vector.begin(), vector.end(), queue);
29
30 CHECK_RANGE_EQUAL(
31 uint_, 10, vector,
32 (uint_(1099087573),
33 uint_(2291457337),
34 uint_(4026424941),
35 uint_(420705969),
36 uint_(2250972997),
37 uint_(153107049),
38 uint_(3581708125),
39 uint_(1733142113),
40 uint_(3008982197),
41 uint_(3237988505))
42 );
43}
44
45BOOST_AUTO_TEST_CASE(discard_uint)
46{

Callers

nothing calls this directly

Calls 5

CHECK_RANGE_EQUALFunction · 0.70
generateMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
discardMethod · 0.45

Tested by

no test coverage detected