Stride Reference Manual  1.0
interface.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <stdexcept>
4 
5 namespace unipar {
6 namespace internal {
7 
9 public:
10 
11  // template <typename Impl, typename... TFs>
12  // using RMType = SomeResourceManager<Impl, TFs...>;
13 
15 
17 
18  template<typename RM>
19  void init(RM& rm) {
20  // Implementing this is optional
21  }
22 
23  inline int getNumThreads() const {
24  throw std::logic_error("Please implement getNumThreads");
25  }
26 
27  inline void setNumThreads(int nthreads) {
28  // Implementing this is optional
29  }
30 
31  template<typename IndexF, typename IndexL, typename IndexS, typename Func, typename RM>
32  void parallelFor(IndexF first, IndexL last, IndexS step, const Func& f, RM& rm) {
33  throw std::logic_error("Please implement parallelFor");
34  }
35 };
36 
37 }
38 }
void setNumThreads(int nthreads)
Definition: interface.h:27
void parallelFor(IndexF first, IndexL last, IndexS step, const Func &f, RM &rm)
Definition: interface.h:32
Unified Parallelisation.
Definition: dummy.h:7