Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F68937270
component_libmultiscale.cc
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Jun 29, 13:51
Size
1006 B
Mime Type
text/x-c
Expires
Mon, Jul 1, 13:51 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
18636474
Attached To
rLIBMULTISCALE LibMultiScale
component_libmultiscale.cc
View Options
/* -------------------------------------------------------------------------- */
#include "component_libmultiscale.hh"
#include "comm_group.hh"
/* -------------------------------------------------------------------------- */
__BEGIN_LIBMULTISCALE__
/* -------------------------------------------------------------------------- */
void
Component
::
compute
()
{
bool
need_recompute
=
this
->
checkDependency
(
this
->
inputs
);
bool
amIinGroup
=
comm_group
==
nullptr
||
comm_group
->
amIinGroup
();
if
(
not
amIinGroup
)
{
throw
NotInCommGroup
{
"For component '"
+
this
->
getID
()
+
" I am not in the right group"
};
}
if
(
!
need_recompute
&&
calculated_once
)
return
;
this
->
compute_make_call
();
this
->
acquireRelease
(
this
->
inputs
);
for
(
auto
&
pair
:
this
->
outputs
)
{
auto
&
arg
=
pair
.
second
;
arg
.
setRelease
(
this
->
getRelease
());
}
calculated_once
=
true
;
}
__END_LIBMULTISCALE__
/* -------------------------------------------------------------------------- */
Event Timeline
Log In to Comment