[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/ModuleWorks/taskflow/task_isolation/unittests/test_reduce.cpp [Back]  [Original]

#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN

#include 
#include 
#include 

// ----------------------------------------------------------------------------
// Data Type
// ----------------------------------------------------------------------------

struct MoveOnly1{

  int a {-1234};
  
  MoveOnly1() = default;

  MoveOnly1(const MoveOnly1&) = delete;
  MoveOnly1(MoveOnly1&&) = default;

  MoveOnly1& operator = (const MoveOnly1& rhs) = delete;
  MoveOnly1& operator = (MoveOnly1&& rhs) = default;

};

struct MoveOnly2{

  int b {-1234};

  MoveOnly2() = default;

  MoveOnly2(const MoveOnly2&) = delete;
  MoveOnly2(MoveOnly2&&) = default;

  MoveOnly2& operator = (const MoveOnly2& rhs) = delete;
  MoveOnly2& operator = (MoveOnly2&& rhs) = default;

};

// --------------------------------------------------------
// Testcase: reduce
// --------------------------------------------------------

template 
void reduce_min(unsigned W) {

  tf::Executor executor(W);
  tf::Taskflow taskflow;

  std::vector vec(1000);

  for(auto& i : vec) i = ::rand() % 100 - 50;

  for(size_t n=1; n

Web Proxy Viewer  |  New URL  |  Original Page