Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F70977724
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
Mon, Jul 8, 14:18
Size
1006 B
Mime Type
text/x-c
Expires
Wed, Jul 10, 14:18 (2 d)
Engine
blob
Format
Raw Data
Handle
18892514
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