Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F375335
AppExecutionPolicy.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Size
2 KB
Referenced Files
None
Subscribers
None
AppExecutionPolicy.cpp
View Options
//===-- app/AppExecutionPolicy.cpp ------------------------------*- C++ -*-===//
//
// The RoSA Framework
//
// Distributed under the terms and conditions of the Boost Software License 1.0.
// See accompanying file LICENSE.
//
// If you did not receive a copy of the license file, see
// http://www.boost.org/LICENSE_1_0.txt.
//
//===----------------------------------------------------------------------===//
///
/// \file app/AppExecutionPolicy.cpp
///
/// \author David Juhasz (david.juhasz@tuwien.ac.at)
///
/// \date 2019-2020
///
/// \brief Implementation for rosa/app/AppExecutionPolicy.h.
///
//===----------------------------------------------------------------------===//
#include
"rosa/app/AppExecutionPolicy.h"
#include
"rosa/app/AppSystem.hpp"
#include
"executionpolicies/AwaitAll.h"
#include
"executionpolicies/AwaitAny.h"
#include
"executionpolicies/Decimation.h"
namespace
rosa
{
namespace
app
{
std
::
unique_ptr
<
AppExecutionPolicy
>
AppExecutionPolicy
::
decimation
(
const
size_t
D
)
{
return
std
::
unique_ptr
<
AppExecutionPolicy
>
(
new
Decimation
(
D
));
}
std
::
unique_ptr
<
AppExecutionPolicy
>
AppExecutionPolicy
::
awaitAll
(
const
std
::
set
<
size_t
>
&
S
)
{
return
std
::
unique_ptr
<
AppExecutionPolicy
>
(
new
AwaitAll
(
S
));
}
std
::
unique_ptr
<
AppExecutionPolicy
>
AppExecutionPolicy
::
awaitAny
(
const
std
::
set
<
size_t
>
&
S
)
{
return
std
::
unique_ptr
<
AppExecutionPolicy
>
(
new
AwaitAny
(
S
));
}
bool
AppExecutionPolicy
::
isAppAgent
(
const
AgentHandle
H
,
const
AppSystem
&
S
)
const
noexcept
{
return
S
.
isAppAgent
(
H
);
}
size_t
AppExecutionPolicy
::
numberOfAppAgentInputs
(
const
AgentHandle
H
,
const
AppSystem
&
S
)
const
noexcept
{
auto
A
=
S
.
getAppAgent
(
H
);
return
A
?
A
->
NumberOfInputs
:
0
;
}
}
// End namespace app
}
// End namespace rosa
namespace
std
{
string
to_string
(
const
rosa
::
app
::
AppExecutionPolicy
&
EP
)
{
return
EP
.
dump
();
}
ostream
&
operator
<<
(
ostream
&
OS
,
const
rosa
::
app
::
AppExecutionPolicy
&
EP
)
{
OS
<<
to_string
(
EP
);
return
OS
;
}
}
// End namespace std
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sat, Jun 7, 4:33 PM (4 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
149661
Default Alt Text
AppExecutionPolicy.cpp (2 KB)
Attached To
Mode
R20 SoC_Rosa_repo
Attached
Detach File
Event Timeline
Log In to Comment