#include <atomic>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <iterator>
#include <memory>
#include <sstream>
#include <vector>
#include "pstl_test_config.h"
namespace TestUtils
{
float64_t;
float32_t;
template <class T, std::size_t N>
constexpr size_t
const_size(const T (&)[N]) noexcept
{ … }
template <typename T>
class Sequence;
#define EXPECT_TRUE(condition, message) …
#define EXPECT_FALSE(condition, message) …
#define EXPECT_EQ(expected, actual, message) …
#define EXPECT_EQ_N(expected, actual, n, message) …
inline void
issue_error_message(std::stringstream& outstr)
{ … }
inline void
expect(bool expected, bool condition, const char* file, int32_t line, const char* message)
{ … }
template <typename T>
void
expect_equal(T& expected, T& actual, const char* file, int32_t line, const char* message)
{ … }
template <typename T>
void
expect_equal(Sequence<T>& expected, Sequence<T>& actual, const char* file, int32_t line, const char* message)
{ … }
template <typename Iterator1, typename Iterator2, typename Size>
void
expect_equal(Iterator1 expected_first, Iterator2 actual_first, Size n, const char* file, int32_t line,
const char* message)
{ … }
template <typename Iterator, typename IteratorTag>
class ForwardIterator
{ … };
template <typename Iterator, typename IteratorTag>
class BidirectionalIterator : public ForwardIterator<Iterator, IteratorTag>
{ … };
template <typename Iterator, typename F>
void
fill_data(Iterator first, Iterator last, F f)
{ … }
struct MemoryChecker { … };
std::atomic<std::int64_t> MemoryChecker::alive_object_counter{ … };
std::ostream& operator<<(std::ostream& os, const MemoryChecker& val) { … }
bool operator==(const MemoryChecker& v1, const MemoryChecker& v2) { … }
bool operator<(const MemoryChecker& v1, const MemoryChecker& v2) { … }
template <typename T>
class Sequence
{ … };
template <typename T>
void
Sequence<T>::print() const
{ … }
template <typename DataType>
struct is_equal_to
{ … };
inline size_t
HashBits(size_t i, size_t bits)
{ … }
template <typename T, typename U>
class Complement
{ … };
struct OddTag
{ … };
class Sum;
class Number
{ … };
class IsMultiple
{ … };
class Congruent
{ … };
class Add
{ … };
class Sum : public Number
{ … };
class MonoidElement
{ … };
class AssocOp
{ … };
template <typename T>
struct Matrix2x2
{ … };
template <typename T>
bool
operator==(const Matrix2x2<T>& left, const Matrix2x2<T>& right)
{ … }
template <typename T>
Matrix2x2<T>
multiply_matrix(const Matrix2x2<T>& left, const Matrix2x2<T>& right)
{ … }
template <typename Iterator>
struct BaseAdapter
{ … };
template <typename NotReverseIterator>
struct isReverse : std::false_type
{ … };
isReverse<std::reverse_iterator<Iterator>>;
template <typename Iterator, typename IsReverse>
struct ReverseAdapter
{ … };
ReverseAdapter<Iterator, std::false_type>;
template <typename Iterator, typename IteratorTag>
struct IteratorTypeAdapter : BaseAdapter<Iterator>
{ … };
IteratorTypeAdapter<Iterator, std::forward_iterator_tag>;
IteratorTypeAdapter<Iterator, std::bidirectional_iterator_tag>;
template <typename InputIterator, typename IteratorTag, typename IsReverse>
struct MakeIterator
{ … };
constexpr std::size_t GuardSize = …;
constexpr std::ptrdiff_t sizeLimit = …;
template <typename Iter, typename Void = void>
struct iterator_traits_
{ … };
iterator_traits_<Iter, typename std::enable_if<!std::is_void<typename Iter::iterator_category>::value, void>::type>;
template <typename T>
struct iterator_traits_<T*>
{
typedef std::random_access_iterator_tag iterator_category;
};
template <typename Iter, typename Tag>
using is_same_iterator_category = std::is_same<typename iterator_traits_<Iter>::iterator_category, Tag>;
template <typename IsReverse, typename IsConst>
struct invoke_if_
{ … };
template <>
struct invoke_if_<std::false_type, std::false_type>
{ … };
struct non_const_wrapper
{ … };
template <typename Op, typename IteratorTag, bool IsPositiveCondition = true>
struct non_const_wrapper_tagged : non_const_wrapper
{ … };
template <typename Op>
struct run_for_rnd : non_const_wrapper_tagged<Op, std::random_access_iterator_tag>
{ … };
template <typename Op>
struct run_for_rnd_bi : non_const_wrapper_tagged<Op, std::forward_iterator_tag, false>
{ … };
template <typename Op>
struct run_for_rnd_fw : non_const_wrapper_tagged<Op, std::bidirectional_iterator_tag, false>
{ … };
template <typename IteratorTag, typename IsReverse>
struct iterator_invoker
{ … };
iterator_invoker<IteratorTag, std::true_type>;
template <>
struct iterator_invoker<std::forward_iterator_tag, std::true_type>
{ … };
template <typename IsReverse>
struct reverse_invoker
{ … };
struct invoke_on_all_iterator_types
{ … };
template <typename Op, typename... T>
void
invoke_on_all_policies(Op op, T&&... rest)
{ … }
template <typename F>
struct NonConstAdapter
{ … };
template <typename F>
NonConstAdapter<F>
non_const(const F& f)
{ … }
template <typename T>
class Wrapper
{ … };
template <typename T>
std::atomic<size_t> Wrapper<T>::my_count = …;
template <typename T>
std::atomic<size_t> Wrapper<T>::move_count = …;
template <typename InputIterator, typename T, typename BinaryOperation, typename UnaryOperation>
T
transform_reduce_serial(InputIterator first, InputIterator last, T init, BinaryOperation binary_op,
UnaryOperation unary_op) noexcept
{ … }
static const char*
done()
{ … }
template <typename T, typename F>
static void
test_algo_basic_single(F&& f)
{ … }
template <typename T, typename F>
static void
test_algo_basic_double(F&& f)
{ … }
template <typename Policy, typename F>
static void
invoke_if(Policy&&, F f)
{ … }
}