24 #ifndef __GLIPLIB_PIPELINE__
25 #define __GLIPLIB_PIPELINE__
42 class __HdlTextureFormat_OnlyData;
49 namespace CorePipeline
56 #define ELEMENT_NOT_ASSOCIATED (-2)
95 typedef std::vector<AbstractComponentLayout*> ComponentList;
96 std::vector<Connection> connections;
97 ComponentList elementsLayout;
98 std::vector<ComponentKind> elementsKind;
99 std::vector<std::string> elementsName;
100 std::vector<int> elementsID;
108 void setElementID(
int i,
int ID);
109 std::vector<Connection> getConnectionDestinations(
int id,
int p);
110 Connection getConnectionSource(
int id,
int p);
120 void checkElement(
int i)
const;
121 int getNumElements(
void)
const;
122 int getNumConnections(
void)
const;
123 void getInfoElements(
int& numFilters,
int& numPipelines,
int& numUniformVariables);
124 int getElementIndex(
const std::string& name)
const;
125 bool doesElementExist(
const std::string& name)
const;
126 bool doesElementExist(
const std::vector<std::string>& path)
const;
128 const std::string& getElementName(
int i)
const;
129 int getElementID(
int i)
const;
130 int getElementID(
const std::string& name)
const;
141 bool check(
bool exception =
true);
193 int addInput(
const std::string& name);
194 int addOutput(
const std::string& name);
196 void connect(
int filterOut,
int portOut,
int filterIn,
int portIn);
197 void connect(
const std::string& filterOut,
const std::string& portOut,
const std::string& filterIn,
const std::string& portIn);
198 void connectToInput(
int port,
int filterIn,
int portIn);
199 void connectToInput(
const std::string& port,
const std::string& filterIn,
const std::string& portIn);
200 void connectToOutput(
int filterOut,
int portOut,
int port);
201 void connectToOutput(
const std::string& filterOut,
const std::string& portOut,
const std::string& port);
202 void autoConnect(
void);
276 std::vector<int> inputBufferIdx;
277 std::vector<int> inputArgumentIdx;
288 struct BufferFormatsCell
290 std::vector<HdlTextureFormat> formats;
291 std::vector<int> outputCounts;
293 int size(
void)
const;
294 void append(
const HdlAbstractTextureFormat& fmt,
int count);
299 std::vector<HdlFBO*> buffersList;
301 BuffersCell(
const BufferFormatsCell& bufferFormats);
306 std::vector<HdlTexture*> inputsList;
307 BufferFormatsCell bufferFormats;
308 std::map<int, BuffersCell*> cells;
309 BuffersCell* currentCell;
310 std::vector<Filter*> filtersList;
311 std::vector<ActionHub> actionsList;
312 std::vector<OutputHub> outputsList;
313 std::map<int, int> filtersGlobalIDsList;
319 std::vector<double> perfs;
323 Pipeline(
const AbstractPipelineLayout& p,
const std::string& name,
bool fake);
324 void cleanInput(
void);
325 void build(
int& currentIdx, std::vector<Filter*>& filters, std::map<int, int>& filtersGlobalID, std::vector<Connection>& connections, AbstractPipelineLayout& originalLayout);
326 void allocateBuffers(std::vector<Connection>& connections);
334 Pipeline(
const AbstractPipelineLayout& p,
const std::string& name);
337 int getNumActions(
void)
const;
338 int getSize(
bool askDriver =
false);
340 Pipeline& operator<<(HdlTexture& texture);
341 Pipeline& operator<<(Pipeline& pipeline);
342 Pipeline& operator<<(ActionType a);
343 HdlTexture& out(
int id = 0,
int cellID=0);
344 HdlTexture& out(
const std::string& portName,
int cellID=0);
345 Filter& operator[](
int filterID);
346 bool wentThroughFirstRun(
void)
const;
347 bool isBroken(
void)
const;
349 int createBuffersCell(
void);
350 int getNumBuffersCells(
void)
const;
351 bool isBuffersCellValid(
int cellID)
const;
352 int getCurrentCellID(
void)
const;
353 std::vector<int> getCellIDs(
void)
const;
354 void changeTargetBuffersCell(
int cellID);
355 void removeBuffersCell(
int cellID);
357 void enablePerfsMonitoring(
void);
358 void disablePerfsMonitoring(
void);
359 double getTiming(
int filterID);
360 double getTiming(
int action, std::string& filterName);
361 double getTotalTiming(
void);
Layout of a component template.
Definition: Component.hpp:89
int idOut
The ID of the element emitting the connection.
Definition: Pipeline.hpp:88
Object describing connetion betwen elements in a pipeline.
Definition: Pipeline.hpp:81
Filter layout (Read Only).
Definition: Filter.hpp:59
Pipeline layout (Read Only).
Definition: Pipeline.hpp:63
int idIn
The ID of the element receiving the connection.
Definition: Pipeline.hpp:84
Definition: Component.hpp:32
ComponentKind
Flags describing the component kind.
Definition: Pipeline.hpp:67
To start process.
Definition: Pipeline.hpp:268
int portIn
The ID of the port of the element receiving the connection.
Definition: Pipeline.hpp:86
Element of a pipeline.
Definition: Component.hpp:110
int portOut
The ID of the port of the element emitting the connection.
Definition: Pipeline.hpp:90
Pipeline layout.
Definition: Pipeline.hpp:185
Pipeline object.
Definition: Pipeline.hpp:261
Layout of a component template (Read Only)
Definition: Component.hpp:51
ActionType
Actions enumeration.
Definition: Pipeline.hpp:265