souffle  2.0.2-371-g6315b36
Public Member Functions | Protected Member Functions
souffle::ram::ParallelAggregate Class Reference

Parallel Aggregation function applied on some relation. More...

#include <ParallelAggregate.h>

Inheritance diagram for souffle::ram::ParallelAggregate:
Inheritance graph
Collaboration diagram for souffle::ram::ParallelAggregate:
Collaboration graph

Public Member Functions

ParallelAggregateclone () const override
 Create a clone (i.e. More...
 
 ParallelAggregate (Own< Operation > nested, AggregateOp fun, std::string rel, Own< Expression > expression, Own< Condition > condition, int ident)
 
- Public Member Functions inherited from souffle::ram::Aggregate
 Aggregate (Own< Operation > nested, AggregateOp fun, std::string rel, Own< Expression > expression, Own< Condition > condition, int ident)
 
void apply (const NodeMapper &map) override
 Apply the mapper to all child nodes. More...
 
std::vector< const Node * > getChildNodes () const override
 Obtain list of all embedded child nodes. More...
 
- Public Member Functions inherited from souffle::ram::RelationOperation
const std::string & getRelation () const
 Get search relation. More...
 
 RelationOperation (std::string rel, int ident, Own< Operation > nested, std::string profileText="")
 
- Public Member Functions inherited from souffle::ram::TupleOperation
std::vector< const Node * > getChildNodes () const override
 Obtain list of all embedded child nodes. More...
 
int getTupleId () const
 Get identifier. More...
 
void setTupleId (int id)
 Set identifier. More...
 
 TupleOperation (int ident, Own< Operation > nested, std::string profileText="")
 
- Public Member Functions inherited from souffle::ram::NestedOperation
void apply (const NodeMapper &map) override
 Apply the mapper to all child nodes. More...
 
OperationgetOperation () const
 Get nested operation. More...
 
const std::string & getProfileText () const
 Get profile text. More...
 
 NestedOperation (Own< Operation > nested, std::string profileText="")
 
- Public Member Functions inherited from souffle::ram::Node
bool operator!= (const Node &other) const
 Inequality check for two RAM nodes. More...
 
bool operator== (const Node &other) const
 Equivalence check for two RAM nodes. More...
 
virtual void rewrite (const Node *oldNode, Own< Node > newNode)
 Rewrite a child node. More...
 
virtual ~Node ()=default
 
- Public Member Functions inherited from souffle::ram::AbstractAggregate
 AbstractAggregate (AggregateOp fun, Own< Expression > expr, Own< Condition > cond)
 
std::vector< const Node * > getChildNodes () const
 
const ConditiongetCondition () const
 Get condition. More...
 
const ExpressiongetExpression () const
 Get target expression. More...
 
AggregateOp getFunction () const
 Get aggregation function. More...
 
virtual ~AbstractAggregate ()=default
 

Protected Member Functions

void print (std::ostream &os, int tabpos) const override
 Pretty print with indentation. More...
 
- Protected Member Functions inherited from souffle::ram::Aggregate
bool equal (const Node &node) const override
 Equality check for two RAM nodes. More...
 
- Protected Member Functions inherited from souffle::ram::RelationOperation
bool equal (const Node &node) const override
 Equality check for two RAM nodes. More...
 
- Protected Member Functions inherited from souffle::ram::TupleOperation
bool equal (const Node &node) const override
 Equality check for two RAM nodes. More...
 
- Protected Member Functions inherited from souffle::ram::Operation
void print (std::ostream &os) const override
 Print RAM node. More...
 
- Protected Member Functions inherited from souffle::ram::AbstractAggregate
bool equal (const Node &node) const
 
void print (std::ostream &os, int) const
 

Additional Inherited Members

- Static Protected Member Functions inherited from souffle::ram::Operation
static void print (const Operation *operation, std::ostream &os, int tabpos)
 Pretty print jump-bed. More...
 
- Protected Attributes inherited from souffle::ram::RelationOperation
const std::string relation
 Search relation. More...
 
- Protected Attributes inherited from souffle::ram::TupleOperation
int identifier
 Identifier for the tuple, corresponding to its position in the loop nest. More...
 
- Protected Attributes inherited from souffle::ram::NestedOperation
Own< OperationnestedOperation
 Nested operation. More...
 
const std::string profileText
 Text used by the profiler. More...
 
- Protected Attributes inherited from souffle::ram::AbstractAggregate
Own< Conditioncondition
 Aggregation tuple condition. More...
 
Own< Expressionexpression
 Aggregation expression. More...
 
const AggregateOp function
 Aggregation function. More...
 

Detailed Description

Parallel Aggregation function applied on some relation.

For example:

PARALLEL t0.0 = COUNT FOR ALL t0 IN A

Applies the function PARALLEL COUNT to determine the number of elements in A.

Definition at line 53 of file ParallelAggregate.h.

Constructor & Destructor Documentation

◆ ParallelAggregate()

souffle::ram::ParallelAggregate::ParallelAggregate ( Own< Operation nested,
AggregateOp  fun,
std::string  rel,
Own< Expression expression,
Own< Condition condition,
int  ident 
)
inline

Member Function Documentation

◆ clone()

ParallelAggregate* souffle::ram::ParallelAggregate::clone ( ) const
inlineoverridevirtual

Create a clone (i.e.

deep copy) of this node

Reimplemented from souffle::ram::Aggregate.

Definition at line 59 of file ParallelAggregate.h.

60  :
61  void print(std::ostream& os, int tabpos) const override {
62  os << times(" ", tabpos);

References souffle::ram::TupleOperation::getTupleId(), souffle::ram::AbstractAggregate::print(), and souffle::times().

Here is the call graph for this function:

◆ print()

void souffle::ram::ParallelAggregate::print ( std::ostream &  os,
int  tabpos 
) const
inlineoverrideprotectedvirtual

Pretty print with indentation.

Reimplemented from souffle::ram::Aggregate.

Definition at line 65 of file ParallelAggregate.h.

66  {
67  os << " WHERE " << getCondition();
68  }
69  os << std::endl;
70  RelationOperation::print(os, tabpos + 1);
71  }
72 };
73 
74 } // namespace souffle::ram

References souffle::ram::AbstractAggregate::getCondition().

Here is the call graph for this function:

The documentation for this class was generated from the following file:
souffle::ram::ParallelAggregate::ParallelAggregate
ParallelAggregate(Own< Operation > nested, AggregateOp fun, std::string rel, Own< Expression > expression, Own< Condition > condition, int ident)
Definition: ParallelAggregate.h:55
souffle::ram::AbstractAggregate::getCondition
const Condition & getCondition() const
Get condition.
Definition: AbstractAggregate.h:53
souffle::ram::ParallelAggregate::print
void print(std::ostream &os, int tabpos) const override
Pretty print with indentation.
Definition: ParallelAggregate.h:65
souffle::ram::NestedOperation::getOperation
Operation & getOperation() const
Get nested operation.
Definition: NestedOperation.h:62
souffle::ram::RelationOperation::relation
const std::string relation
Search relation.
Definition: RelationOperation.h:60
souffle::clone
auto clone(const std::vector< A * > &xs)
Definition: ContainerUtil.h:172
souffle::times
detail::multiplying_printer< T > times(const T &value, unsigned num)
A utility printing a given value multiple times.
Definition: StreamUtil.h:322
souffle::ram::AbstractAggregate::expression
Own< Expression > expression
Aggregation expression.
Definition: AbstractAggregate.h:104
souffle::AggregateOp::COUNT
@ COUNT
souffle::ram::TupleOperation::identifier
int identifier
Identifier for the tuple, corresponding to its position in the loop nest.
Definition: TupleOperation.h:66
souffle::ram::NestedOperation::print
void print(std::ostream &os, int tabpos) const override
Pretty print with indentation.
Definition: NestedOperation.h:80
souffle::ram::AbstractAggregate::condition
Own< Condition > condition
Aggregation tuple condition.
Definition: AbstractAggregate.h:107