#include <module/module.h>
Public Member Functions | |
Module (const std::string &name, const int moduleID, mpi::communicator comm) | |
virtual | ~Module () |
virtual void | eventLoop () |
void | initDone () |
virtual bool | dispatch (bool block=true, bool *messageReceived=nullptr) |
Parameter * | addParameterGeneric (const std::string &name, std::shared_ptr< Parameter > parameter) override |
bool | removeParameter (Parameter *param) override |
const std::string & | name () const |
const mpi::communicator & | comm () const |
const mpi::communicator & | commShmGroup () const |
int | rank () const |
int | size () const |
int | shmLeader (int rank=-1) const |
int | id () const |
unsigned | hardware_concurrency () const |
ObjectCache::CacheMode | setCacheMode (ObjectCache::CacheMode mode, bool update=true) |
ObjectCache::CacheMode | cacheMode () const |
Port * | createInputPort (const std::string &name, const std::string &description="", const int flags=0) |
Port * | createOutputPort (const std::string &name, const std::string &description="", const int flags=0) |
bool | destroyPort (const std::string &portName) |
bool | destroyPort (const Port *port) |
bool | sendObject (const mpi::communicator &comm, vistle::Object::const_ptr object, int destRank) const |
bool | sendObject (vistle::Object::const_ptr object, int destRank) const |
vistle::Object::const_ptr | receiveObject (const mpi::communicator &comm, int destRank) const |
vistle::Object::const_ptr | receiveObject (int destRank) const |
bool | broadcastObject (const mpi::communicator &comm, vistle::Object::const_ptr &object, int root) const |
bool | broadcastObject (vistle::Object::const_ptr &object, int root) const |
bool | broadcastObjectViaShm (vistle::Object::const_ptr &object, const std::string &objName, int root) const |
bool | addObject (Port *port, vistle::Object::ptr object) |
bool | addObject (const std::string &portName, vistle::Object::ptr object) |
bool | passThroughObject (Port *port, vistle::Object::const_ptr object) |
bool | passThroughObject (const std::string &portName, vistle::Object::const_ptr object) |
ObjectList | getObjects (const std::string &portName) |
bool | hasObject (const Port *port) const |
bool | hasObject (const std::string &portName) const |
vistle::Object::const_ptr | takeFirstObject (Port *port) |
vistle::Object::const_ptr | takeFirstObject (const std::string &portName) |
template<class Type > | |
Type::const_ptr | accept (Port *port) |
template<class Type > | |
Type::const_ptr | accept (const std::string &port) |
template<class Interface > | |
const Interface * | acceptInterface (Port *port) |
template<class Interface > | |
const Interface * | acceptInterface (const std::string &port) |
template<class Type > | |
Type::const_ptr | expect (Port *port) |
template<class Type > | |
Type::const_ptr | expect (const std::string &port) |
void | requestPortMapping (unsigned short forwardPort, unsigned short localPort) |
request hub to forward incoming connections on forwardPort to be forwarded to localPort More... | |
void | removePortMapping (unsigned short forwardPort) |
remove port forwarding requested by requestPortMapping More... | |
void | sendParameterMessage (const message::Message &message, const buffer *payload) const override |
bool | sendMessage (const message::Message &message, const buffer *payload=nullptr) const override |
bool | sendMessage (const message::Message &message, const MessagePayload &payload) const override |
template<class Payload > | |
bool | sendMessageWithPayload (message::Message &message, Payload &payload) const |
void | sendText (int type, const std::string &msg) const |
type should be a message::SendText::TextType More... | |
void | sendInfo (const char *fmt,...) const |
send info message to UI - printf style More... | |
void | sendWarning (const char *fmt,...) const |
send warning message to UI - printf style More... | |
void | sendError (const char *fmt,...) const |
send error message to UI - printf style More... | |
void | sendError (const message::Message &msg, const char *fmt,...) const |
send response message to UI - printf style More... | |
void | sendInfo (const std::string &text) const |
send info message to UI - string style More... | |
void | sendWarning (const std::string &text) const |
send warning message to UI - string style More... | |
void | sendError (const std::string &text) const |
send error message to UI - string style More... | |
void | sendError (const message::Message &msg, const std::string &text) const |
send response message to UI - string style More... | |
int | schedulingPolicy () const |
void | setSchedulingPolicy (int schedulingPolicy) |
int | reducePolicy () const |
void | setReducePolicy (int reduceRequirement) |
virtual void | prepareQuit () |
const HubData & | getHub () const |
bool | isConnected (const Port &port) const |
bool | isConnected (const std::string &portname) const |
std::string | getModuleName (int id) const |
int | mirrorId () const |
std::set< int > | getMirrors () const |
template<> | |
V_MODULEEXPORT Object::const_ptr | expect (Port *port) |
template<> | |
Object::const_ptr | expect (Port *port) |
Public Member Functions inherited from vistle::ParameterManager | |
ParameterManager (const std::string &name, int id) | |
virtual | ~ParameterManager () |
void | setCurrentParameterGroup (const std::string &group=std::string()) |
set group for all subsequently added parameters, reset with empty group More... | |
const std::string & | currentParameterGroup () const |
bool | updateParameter (const std::string &name, const Parameter *parameter, const message::SetParameter *inResponseTo, Parameter::RangeType rt=Parameter::Value) |
template<class T > | |
Parameter * | addParameter (const std::string &name, const std::string &description, const T &value, Parameter::Presentation presentation=Parameter::Generic) |
template<class T > | |
bool | setParameter (const std::string &name, const T &value, const message::SetParameter *inResponseTo=nullptr) |
template<class T > | |
bool | setParameter (ParameterBase< T > *param, const T &value, const message::SetParameter *inResponseTo=nullptr) |
template<class T > | |
bool | setParameterMinimum (ParameterBase< T > *param, const T &minimum) |
template<class T > | |
bool | setParameterMaximum (ParameterBase< T > *param, const T &maximum) |
template<class T > | |
bool | setParameterRange (const std::string &name, const T &minimum, const T &maximum) |
template<class T > | |
bool | setParameterRange (ParameterBase< T > *param, const T &minimum, const T &maximum) |
template<class T > | |
bool | getParameter (const std::string &name, T &value) const |
void | setParameterChoices (const std::string &name, const std::vector< std::string > &choices) |
void | setParameterChoices (Parameter *param, const std::vector< std::string > &choices) |
void | setParameterFilters (const std::string &name, const std::string &filters) |
void | setParameterFilters (StringParameter *param, const std::string &filters) |
StringParameter * | addStringParameter (const std::string &name, const std::string &description, const std::string &value, Parameter::Presentation p=Parameter::Generic) |
bool | setStringParameter (const std::string &name, const std::string &value, const message::SetParameter *inResponseTo=NULL) |
std::string | getStringParameter (const std::string &name) const |
FloatParameter * | addFloatParameter (const std::string &name, const std::string &description, const Float value) |
bool | setFloatParameter (const std::string &name, const Float value, const message::SetParameter *inResponseTo=NULL) |
Float | getFloatParameter (const std::string &name) const |
IntParameter * | addIntParameter (const std::string &name, const std::string &description, const Integer value, Parameter::Presentation p=Parameter::Generic) |
bool | setIntParameter (const std::string &name, const Integer value, const message::SetParameter *inResponseTo=NULL) |
Integer | getIntParameter (const std::string &name) const |
VectorParameter * | addVectorParameter (const std::string &name, const std::string &description, const ParamVector &value) |
bool | setVectorParameter (const std::string &name, const ParamVector &value, const message::SetParameter *inResponseTo=NULL) |
ParamVector | getVectorParameter (const std::string &name) const |
IntVectorParameter * | addIntVectorParameter (const std::string &name, const std::string &description, const IntParamVector &value) |
bool | setIntVectorParameter (const std::string &name, const IntParamVector &value, const message::SetParameter *inResponseTo=NULL) |
IntParamVector | getIntVectorParameter (const std::string &name) const |
bool | removeParameter (const std::string &name) |
std::shared_ptr< Parameter > | findParameter (const std::string &name) const |
void | init () |
void | quit () |
bool | handleMessage (const message::SetParameter &message) |
template<class Payload > | |
void | sendParameterMessageWithPayload (message::Message &message, Payload &payload) |
virtual bool | changeParameters (std::set< const Parameter * > params) |
void | setId (int id) |
int | id () const |
void | setName (const std::string &name) |
void | applyDelayedChanges () |
Public Member Functions inherited from vistle::MessageSender | |
virtual | ~MessageSender () |
Static Public Member Functions | |
static bool | setup (const std::string &shmname, int moduleID, int rank) |
Protected Member Functions | |
void | setObjectReceivePolicy (int pol) |
int | objectReceivePolicy () const |
void | startIteration () |
void | setDefaultCacheMode (ObjectCache::CacheMode mode) |
void | updateMeta (vistle::Object::ptr object) const |
virtual bool | handleMessage (const message::Message *message, const vistle::MessagePayload &payload) |
virtual bool | handleExecute (const message::Execute *exec) |
bool | cancelRequested (bool collective=false) |
bool | wasCancelRequested () const |
virtual void | cancelExecuteMessageReceived (const message::Message *msg) |
virtual bool | addInputObject (int sender, const std::string &senderPort, const std::string &portName, Object::const_ptr object) |
virtual bool | objectAdded (int sender, const std::string &senderPort, const Port *port) |
bool | syncMessageProcessing () const |
void | setSyncMessageProcessing (bool sync) |
virtual void | connectionAdded (const Port *from, const Port *to) |
virtual void | connectionRemoved (const Port *from, const Port *to) |
bool | changeParameter (const Parameter *p) override |
int | openmpThreads () const |
void | setOpenmpThreads (int, bool updateParam=true) |
void | enableBenchmark (bool benchmark, bool updateParam=true) |
virtual bool | prepare () |
virtual bool | reduce (int timestep) |
virtual bool | cancelExecute () |
int | numTimesteps () const |
void | setStatus (const std::string &text, message::UpdateStatus::Importance prio=message::UpdateStatus::Low) |
void | clearStatus () |
bool | getNextMessage (message::Buffer &buf, bool block=true) |
bool | reduceWrapper (const message::Execute *exec, bool reordered=false) |
bool | prepareWrapper (const message::Execute *exec) |
Protected Attributes | |
const std::string | m_name |
int | m_rank |
int | m_size |
const int | m_id |
int | m_executionCount |
int | m_iteration |
std::set< Port * > | m_withOutput |
message::MessageQueue * | sendMessageQueue |
message::MessageQueue * | receiveMessageQueue |
std::deque< message::Buffer > | messageBacklog |
Friends | |
class | Reader |
class | Renderer |
class | PortTask |
Module::Module | ( | const std::string & | name, |
const int | moduleID, | ||
mpi::communicator | comm | ||
) |
|
virtual |
Type::const_ptr Module::accept | ( | const std::string & | port | ) |
Type::const_ptr Module::accept | ( | Port * | port | ) |
const Interface * vistle::Module::acceptInterface | ( | const std::string & | port | ) |
const Interface * vistle::Module::acceptInterface | ( | Port * | port | ) |
|
protectedvirtual |
bool Module::addObject | ( | const std::string & | portName, |
vistle::Object::ptr | object | ||
) |
bool Module::addObject | ( | Port * | port, |
vistle::Object::ptr | object | ||
) |
|
overridevirtual |
Reimplemented from vistle::ParameterManager.
bool Module::broadcastObject | ( | const mpi::communicator & | comm, |
vistle::Object::const_ptr & | object, | ||
int | root | ||
) | const |
bool Module::broadcastObject | ( | vistle::Object::const_ptr & | object, |
int | root | ||
) | const |
bool Module::broadcastObjectViaShm | ( | vistle::Object::const_ptr & | object, |
const std::string & | objName, | ||
int | root | ||
) | const |
ObjectCache::CacheMode Module::cacheMode | ( | ) | const |
|
protectedvirtual |
|
protectedvirtual |
|
protected |
|
overrideprotectedvirtual |
Reimplemented from vistle::ParameterManager.
Reimplemented in vistle::Reader.
|
protected |
const mpi::communicator & Module::comm | ( | ) | const |
const mpi::communicator & Module::commShmGroup | ( | ) | const |
Port * Module::createInputPort | ( | const std::string & | name, |
const std::string & | description = "" , |
||
const int | flags = 0 |
||
) |
Port * Module::createOutputPort | ( | const std::string & | name, |
const std::string & | description = "" , |
||
const int | flags = 0 |
||
) |
bool Module::destroyPort | ( | const Port * | port | ) |
bool Module::destroyPort | ( | const std::string & | portName | ) |
|
virtual |
|
protected |
|
virtual |
Type::const_ptr Module::expect | ( | const std::string & | port | ) |
Object::const_ptr vistle::Module::expect | ( | Port * | port | ) |
Type::const_ptr Module::expect | ( | Port * | port | ) |
V_MODULEEXPORT Object::const_ptr vistle::Module::expect | ( | Port * | port | ) |
const HubData & Module::getHub | ( | ) | const |
std::set< int > Module::getMirrors | ( | ) | const |
std::string Module::getModuleName | ( | int | id | ) | const |
|
protected |
ObjectList Module::getObjects | ( | const std::string & | portName | ) |
|
protectedvirtual |
|
protectedvirtual |
unsigned Module::hardware_concurrency | ( | ) | const |
bool Module::hasObject | ( | const Port * | port | ) | const |
bool Module::hasObject | ( | const std::string & | portName | ) | const |
int Module::id | ( | ) | const |
void Module::initDone | ( | ) |
bool Module::isConnected | ( | const Port & | port | ) | const |
bool Module::isConnected | ( | const std::string & | portname | ) | const |
int Module::mirrorId | ( | ) | const |
const std::string & Module::name | ( | ) | const |
|
protected |
|
protectedvirtual |
|
protected |
|
protected |
bool Module::passThroughObject | ( | const std::string & | portName, |
vistle::Object::const_ptr | object | ||
) |
bool Module::passThroughObject | ( | Port * | port, |
vistle::Object::const_ptr | object | ||
) |
|
protectedvirtual |
|
virtual |
Reimplemented in vistle::Reader.
|
protected |
int Module::rank | ( | ) | const |
Object::const_ptr Module::receiveObject | ( | const mpi::communicator & | comm, |
int | destRank | ||
) | const |
Object::const_ptr Module::receiveObject | ( | int | destRank | ) | const |
|
protectedvirtual |
int Module::reducePolicy | ( | ) | const |
|
protected |
|
overridevirtual |
Reimplemented from vistle::ParameterManager.
void Module::removePortMapping | ( | unsigned short | forwardPort | ) |
remove port forwarding requested by requestPortMapping
void Module::requestPortMapping | ( | unsigned short | forwardPort, |
unsigned short | localPort | ||
) |
request hub to forward incoming connections on forwardPort to be forwarded to localPort
int Module::schedulingPolicy | ( | ) | const |
void Module::sendError | ( | const char * | fmt, |
... | |||
) | const |
send error message to UI - printf style
void Module::sendError | ( | const message::Message & | msg, |
const char * | fmt, | ||
... | |||
) | const |
send response message to UI - printf style
void Module::sendError | ( | const message::Message & | msg, |
const std::string & | text | ||
) | const |
send response message to UI - string style
void Module::sendError | ( | const std::string & | text | ) | const |
send error message to UI - string style
void Module::sendInfo | ( | const char * | fmt, |
... | |||
) | const |
send info message to UI - printf style
void Module::sendInfo | ( | const std::string & | text | ) | const |
send info message to UI - string style
|
overridevirtual |
Implements vistle::MessageSender.
|
overridevirtual |
Implements vistle::MessageSender.
bool Module::sendMessageWithPayload | ( | message::Message & | message, |
Payload & | payload | ||
) | const |
bool Module::sendObject | ( | const mpi::communicator & | comm, |
vistle::Object::const_ptr | object, | ||
int | destRank | ||
) | const |
bool Module::sendObject | ( | vistle::Object::const_ptr | object, |
int | destRank | ||
) | const |
|
overridevirtual |
Implements vistle::ParameterManager.
void Module::sendText | ( | int | type, |
const std::string & | msg | ||
) | const |
type should be a message::SendText::TextType
void Module::sendWarning | ( | const char * | fmt, |
... | |||
) | const |
send warning message to UI - printf style
void Module::sendWarning | ( | const std::string & | text | ) | const |
send warning message to UI - string style
ObjectCache::CacheMode Module::setCacheMode | ( | ObjectCache::CacheMode | mode, |
bool | update = true |
||
) |
|
protected |
|
protected |
|
protected |
void Module::setReducePolicy | ( | int | reduceRequirement | ) |
void Module::setSchedulingPolicy | ( | int | schedulingPolicy | ) |
|
protected |
|
protected |
|
static |
int Module::shmLeader | ( | int | rank = -1 | ) | const |
int Module::size | ( | ) | const |
|
protected |
|
protected |
vistle::Object::const_ptr Module::takeFirstObject | ( | const std::string & | portName | ) |
vistle::Object::const_ptr Module::takeFirstObject | ( | Port * | port | ) |
|
protected |
|
protected |
|
friend |
|
friend |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |