[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/DerThorsten/cpp-taskflow/master/example/matrix.cpp [Back]  [Original]

// This program computes the dot products over a set of independent vectors
// and compares the runtime between baseline (sequential), OpenMP, C++ thread,
// and Taskflow implementations.

#include 
#include 
#include 
#include 

using matrix_t = std::vector;

// ----------------------------------------------------------------------------
// Utility section
// ----------------------------------------------------------------------------

// Function: random_matrix
matrix_t random_matrix(size_t N) {
  
  thread_local std::default_random_engine gen(0);
  std::normal_distribution d{0.0f, 1.0f};

  std::ostringstream oss;
  oss 

Web Proxy Viewer  |  New URL  |  Original Page