JayBeams  0.1
Another project to have fun coding.
Functions
ut_generic_reduce.cpp File Reference
#include <jb/opencl/config.hpp>
#include <jb/opencl/device_selector.hpp>
#include <jb/opencl/generic_reduce.hpp>
#include <jb/testing/check_close_enough.hpp>
#include <jb/testing/create_random_timeseries.hpp>
#include <jb/complex_traits.hpp>
#include <boost/compute/command_queue.hpp>
#include <boost/compute/container.hpp>
#include <boost/compute/context.hpp>
#include <boost/compute/type_traits.hpp>
#include <boost/compute/types/complex.hpp>
#include <boost/test/unit_test.hpp>
#include <memory>
#include <random>
#include <sstream>

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (generic_reduce_int_2e6)
 
 BOOST_AUTO_TEST_CASE (generic_reduce_int_2e13)
 
 BOOST_AUTO_TEST_CASE (generic_reduce_int_2e20)
 
 BOOST_AUTO_TEST_CASE (generic_reduce_int_1000000)
 
 BOOST_AUTO_TEST_CASE (generic_reduce_int_PRIMES)
 
 BOOST_AUTO_TEST_CASE (generic_reduce_float_PRIMES)
 
 BOOST_AUTO_TEST_CASE (generic_reduce_complex_float_PRIMES)
 
 BOOST_AUTO_TEST_CASE (generic_reduce_complex_double_PRIMES)
 
 BOOST_AUTO_TEST_CASE (generic_reduce_double_subset)
 
 BOOST_AUTO_TEST_CASE (generic_reduce_float_broken)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/10]

BOOST_AUTO_TEST_CASE ( generic_reduce_int_2e6  )
Test:
Make sure the jb::tde::generic_reduce() works as expected.for sizes around ~256, which is close to MAX_WORK_GROUP_SIZE

Definition at line 147 of file ut_generic_reduce.cpp.

References jb::testing::defaults::size.

◆ BOOST_AUTO_TEST_CASE() [2/10]

BOOST_AUTO_TEST_CASE ( generic_reduce_int_2e13  )
Test:
Make sure the jb::tde::generic_reduce() works as expected.for sizes around ~256 * 32, which is close to MAX_WORK_GROUP_SIZE * MAX_COMPUTE_UNITS

Definition at line 160 of file ut_generic_reduce.cpp.

References jb::testing::defaults::size.

◆ BOOST_AUTO_TEST_CASE() [3/10]

BOOST_AUTO_TEST_CASE ( generic_reduce_int_2e20  )
Test:
Make sure the jb::tde::generic_reduce() works as expected for 2^20 (1 million binary)

Definition at line 172 of file ut_generic_reduce.cpp.

References jb::testing::defaults::size.

◆ BOOST_AUTO_TEST_CASE() [4/10]

BOOST_AUTO_TEST_CASE ( generic_reduce_int_1000000  )
Test:
Make sure the jb::tde::generic_reduce() works as expected for 1000000

Definition at line 181 of file ut_generic_reduce.cpp.

References jb::testing::defaults::size.

◆ BOOST_AUTO_TEST_CASE() [5/10]

BOOST_AUTO_TEST_CASE ( generic_reduce_int_PRIMES  )
Test:
Make sure the jb::tde::generic_reduce() works as expected for a number that does not have a lot of powers of 2.

Definition at line 190 of file ut_generic_reduce.cpp.

References jb::testing::defaults::size.

◆ BOOST_AUTO_TEST_CASE() [6/10]

BOOST_AUTO_TEST_CASE ( generic_reduce_float_PRIMES  )
Test:
Make sure the jb::tde::generic_reduce() works as expected for a number without a lot of powers of 2

Definition at line 199 of file ut_generic_reduce.cpp.

References jb::testing::defaults::size.

◆ BOOST_AUTO_TEST_CASE() [7/10]

BOOST_AUTO_TEST_CASE ( generic_reduce_complex_float_PRIMES  )
Test:
Make sure the jb::tde::generic_reduce() works as expected for a number without a lot of powers of 2

Definition at line 208 of file ut_generic_reduce.cpp.

References jb::testing::defaults::size.

◆ BOOST_AUTO_TEST_CASE() [8/10]

BOOST_AUTO_TEST_CASE ( generic_reduce_complex_double_PRIMES  )
Test:
Make sure the jb::tde::generic_reduce() works as expected for a number without a lot of powers of 2

Definition at line 217 of file ut_generic_reduce.cpp.

References jb::testing::defaults::size.

◆ BOOST_AUTO_TEST_CASE() [9/10]

BOOST_AUTO_TEST_CASE ( generic_reduce_double_subset  )
Test:
Make sure the jb::tde::generic_reduce() works as expected when used with a subset of the input.

Definition at line 226 of file ut_generic_reduce.cpp.

References jb::testing::defaults::size.

◆ BOOST_AUTO_TEST_CASE() [10/10]

BOOST_AUTO_TEST_CASE ( generic_reduce_float_broken  )
Test:
Improve code coverage, test case of broken code.

Definition at line 235 of file ut_generic_reduce.cpp.