48 lines
877 B
C++

/*!
* \file v3.h
* \brief v3 part of the exercise header file.
*
* \author
* Christos Choutouridis AEM:8997
* <cchoutou@ece.auth.gr>
*/
#ifndef V3_H_
#define V3_H_
#include <iostream>
#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>
#else
#endif
namespace v3 {
//! 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 /* V3_H_ */