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

Find a tuple in a relation such that a given condition holds in parallel. More...

#include <ParallelChoice.h>

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

Public Member Functions

ParallelChoiceclone () const override
 Create a clone (i.e. More...
 
 ParallelChoice (std::string rel, size_t ident, Own< Condition > cond, Own< Operation > nested, std::string profileText="")
 
- Public Member Functions inherited from souffle::ram::Choice
void apply (const NodeMapper &map) override
 Apply the mapper to all child nodes. More...
 
 Choice (std::string rel, size_t ident, Own< Condition > cond, Own< Operation > nested, std::string profileText="")
 
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::AbstractChoice
 AbstractChoice (Own< Condition > cond)
 
void apply (const NodeMapper &map)
 
std::vector< const Node * > getChildNodes () const
 
const ConditiongetCondition () const
 Getter for the condition. More...
 

Protected Member Functions

void print (std::ostream &os, int tabpos) const override
 Pretty print with indentation. More...
 
- Protected Member Functions inherited from souffle::ram::Choice
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::AbstractChoice
bool equal (const Node &node) 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::AbstractChoice
Own< Conditioncondition
 Condition for which a tuple in the relation may hold. More...
 

Detailed Description

Find a tuple in a relation such that a given condition holds in parallel.

For example:

QUERY
...
PARALLEL CHOICE t1 IN A WHERE (t1.x, t1.y) NOT IN A
...

Definition at line 51 of file ParallelChoice.h.

Constructor & Destructor Documentation

◆ ParallelChoice()

souffle::ram::ParallelChoice::ParallelChoice ( std::string  rel,
size_t  ident,
Own< Condition cond,
Own< Operation nested,
std::string  profileText = "" 
)
inline

Member Function Documentation

◆ clone()

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

Create a clone (i.e.

deep copy) of this node

Reimplemented from souffle::ram::Choice.

Definition at line 57 of file ParallelChoice.h.

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

References souffle::ram::TupleOperation::getTupleId(), souffle::ram::RelationOperation::relation, and souffle::times().

Here is the call graph for this function:

◆ print()

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

Pretty print with indentation.

Reimplemented from souffle::ram::Choice.

Definition at line 63 of file ParallelChoice.h.


The documentation for this class was generated from the following file:
souffle::ram::ParallelChoice::print
void print(std::ostream &os, int tabpos) const override
Pretty print with indentation.
Definition: ParallelChoice.h:63
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::NestedOperation::getProfileText
const std::string & getProfileText() const
Get profile text.
Definition: NestedOperation.h:67
souffle::ram::TupleOperation::getTupleId
int getTupleId() const
Get identifier.
Definition: TupleOperation.h:43
souffle::ram::ParallelChoice::ParallelChoice
ParallelChoice(std::string rel, size_t ident, Own< Condition > cond, Own< Operation > nested, std::string profileText="")
Definition: ParallelChoice.h:53
CHOICE
#define CHOICE(Structure, Arity,...)
souffle::ram::AbstractChoice::condition
Own< Condition > condition
Condition for which a tuple in the relation may hold.
Definition: AbstractChoice.h:65