Stride Reference Manual
1.0
Main Page
Namespaces
Classes
Files
File List
File Members
interface.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <stdexcept>
4
5
namespace
unipar
{
6
namespace
internal {
7
8
class
ParallelInterface
{
9
public
:
10
11
// template <typename Impl, typename... TFs>
12
// using RMType = SomeResourceManager<Impl, TFs...>;
13
14
ParallelInterface
(
int
) {}
15
16
ParallelInterface
() {}
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
}
unipar::internal::ParallelInterface::ParallelInterface
ParallelInterface(int)
Definition:
interface.h:14
unipar::internal::ParallelInterface::getNumThreads
int getNumThreads() const
Definition:
interface.h:23
unipar::internal::ParallelInterface::setNumThreads
void setNumThreads(int nthreads)
Definition:
interface.h:27
unipar::internal::ParallelInterface::parallelFor
void parallelFor(IndexF first, IndexL last, IndexS step, const Func &f, RM &rm)
Definition:
interface.h:32
unipar
Unified Parallelisation.
Definition:
dummy.h:7
unipar::internal::ParallelInterface::ParallelInterface
ParallelInterface()
Definition:
interface.h:16
unipar::internal::ParallelInterface
Definition:
interface.h:8
unipar::internal::ParallelInterface::init
void init(RM &rm)
Definition:
interface.h:19
main
cpp
util
unipar
interface.h
Generated on Tue Jun 27 2017 15:38:18 for Stride Reference Manual by
1.8.11