Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1494506
DeluxeExecutionPolicy.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Size
1 KB
Referenced Files
None
Subscribers
None
DeluxeExecutionPolicy.cpp
View Options
//===-- deluxe/DeluxeExecutionPolicy.cpp ------------------------*- C++ -*-===//
//
// The RoSA Framework
//
//===----------------------------------------------------------------------===//
///
/// \file deluxe/DeluxeExecutionPolicy.cpp
///
/// \author David Juhasz (david.juhasz@tuwien.ac.at)
///
/// \date 2019
///
/// \brief Implementation for rosa/deluxe/DeluxeExecutionPolicy.h.
///
//===----------------------------------------------------------------------===//
#include
"rosa/deluxe/DeluxeExecutionPolicy.h"
#include
"rosa/deluxe/DeluxeSystem.hpp"
#include
"executionpolicies/Decimation.h"
#include
"executionpolicies/AwaitAll.h"
#include
"executionpolicies/AwaitAny.h"
namespace
rosa
{
namespace
deluxe
{
std
::
unique_ptr
<
DeluxeExecutionPolicy
>
DeluxeExecutionPolicy
::
decimation
(
const
size_t
D
)
{
return
std
::
unique_ptr
<
DeluxeExecutionPolicy
>
(
new
Decimation
(
D
));
}
std
::
unique_ptr
<
DeluxeExecutionPolicy
>
DeluxeExecutionPolicy
::
awaitAll
(
const
std
::
set
<
size_t
>
&
S
)
{
return
std
::
unique_ptr
<
DeluxeExecutionPolicy
>
(
new
AwaitAll
(
S
));
}
std
::
unique_ptr
<
DeluxeExecutionPolicy
>
DeluxeExecutionPolicy
::
awaitAny
(
const
std
::
set
<
size_t
>
&
S
)
{
return
std
::
unique_ptr
<
DeluxeExecutionPolicy
>
(
new
AwaitAny
(
S
));
}
bool
DeluxeExecutionPolicy
::
isDeluxeAgent
(
const
AgentHandle
H
,
const
DeluxeSystem
&
S
)
const
noexcept
{
return
S
.
isDeluxeAgent
(
H
);
}
size_t
DeluxeExecutionPolicy
::
numberOfDeluxeAgentInputs
(
const
AgentHandle
H
,
const
DeluxeSystem
&
S
)
const
noexcept
{
auto
A
=
S
.
getDeluxeAgent
(
H
);
return
A
?
A
->
NumberOfInputs
:
0
;
}
}
// End namespace deluxe
}
// End namespace rosa
namespace
std
{
string
to_string
(
const
rosa
::
deluxe
::
DeluxeExecutionPolicy
&
EP
)
{
return
EP
.
dump
();
}
ostream
&
operator
<<
(
ostream
&
OS
,
const
rosa
::
deluxe
::
DeluxeExecutionPolicy
&
EP
)
{
OS
<<
to_string
(
EP
);
return
OS
;
}
}
// End namespace std
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sun, Mar 1, 6:46 PM (23 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
281006
Default Alt Text
DeluxeExecutionPolicy.cpp (1 KB)
Attached To
Mode
R20 SoC_Rosa_repo
Attached
Detach File
Event Timeline
Log In to Comment