51 lines
932 B
C++

/*!
* \file v4.h
* \brief v4 part of the exercise header file.
*
* \author
* Christos Choutouridis AEM:8997
* <cchoutou@ece.auth.gr>
*/
#ifndef V4_H_
#define V4_H_
#include <iostream>
#include <string>
#include <mutex>
#include <impl.hpp>
#if defined CILK
#include <cilk/cilk.h>
#include <cilk/cilk_api.h>
#include <cilk/reducer_opadd.h>
#elif defined OMP
#include <omp.h>
#elif defined THREADS
#include <thread>
#include <numeric>
#include <random>
#else
#endif
namespace v4 {
//! Select a data representation suited for V3.
using matrix = SpMat<int, int>;
using index_t = typename matrix::indexType; //!< syntactic sugar alias for index type
using value_t = typename matrix::dataType; //!< syntactic sugar alias for value type
/*
* Common api for all the versions
*/
int nworkers();
std::vector<value_t> triang_v(matrix& A);
value_t triang_count (std::vector<value_t>& c);
};
#endif /* V4_H_ */