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

Effectively identical to IntrinsicOperator, except it can produce multiple results. More...

#include <NestedIntrinsicOperator.h>

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

Public Member Functions

void apply (const NodeMapper &map) override
 Apply the mapper to all child nodes. More...
 
NestedIntrinsicOperatorclone () const override
 Create a clone (i.e. More...
 
std::vector< Expression * > getArguments () const
 
std::vector< const Node * > getChildNodes () const override
 Obtain list of all embedded child nodes. More...
 
NestedIntrinsicOp getFunction () const
 
 NestedIntrinsicOperator (NestedIntrinsicOp op, VecOwn< Expression > args, Own< Operation > nested, int ident)
 
- 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
 

Protected Member Functions

bool equal (const Node &node) const override
 Equality check for two RAM nodes. More...
 
void print (std::ostream &os, int tabpos) const override
 Pretty print with indentation. 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::NestedOperation
void print (std::ostream &os, int tabpos) const override
 Pretty print with indentation. More...
 
- Protected Member Functions inherited from souffle::ram::Operation
void print (std::ostream &os) const override
 Print RAM node. More...
 

Protected Attributes

VecOwn< Expressionargs
 
const NestedIntrinsicOp op
 
- 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...
 

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...
 

Detailed Description

Effectively identical to IntrinsicOperator, except it can produce multiple results.

For example:

RANGE(t0.0, t0.1, t0.2) INTO t1

Definition at line 62 of file NestedIntrinsicOperator.h.

Constructor & Destructor Documentation

◆ NestedIntrinsicOperator()

souffle::ram::NestedIntrinsicOperator::NestedIntrinsicOperator ( NestedIntrinsicOp  op,
VecOwn< Expression args,
Own< Operation nested,
int  ident 
)
inline

Definition at line 64 of file NestedIntrinsicOperator.h.

Member Function Documentation

◆ apply()

void souffle::ram::NestedIntrinsicOperator::apply ( const NodeMapper )
inlineoverridevirtual

Apply the mapper to all child nodes.

Reimplemented from souffle::ram::Node.

Definition at line 88 of file NestedIntrinsicOperator.h.

91  :
92  void print(std::ostream& os, int tabpos) const override {
93  os << times(" ", tabpos);

◆ clone()

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

Create a clone (i.e.

deep copy) of this node

Implements souffle::ram::TupleOperation.

Definition at line 83 of file NestedIntrinsicOperator.h.

84  {
86  for (auto&& x : args) {

References souffle::ram::NestedOperation::apply(), args, and souffle::map().

Here is the call graph for this function:

◆ equal()

bool souffle::ram::NestedIntrinsicOperator::equal ( const Node ) const
inlineoverrideprotectedvirtual

Equality check for two RAM nodes.

Default action is that nothing needs to be checked.

Reimplemented from souffle::ram::Node.

Definition at line 103 of file NestedIntrinsicOperator.h.

◆ getArguments()

std::vector<Expression*> souffle::ram::NestedIntrinsicOperator::getArguments ( ) const
inline

Definition at line 71 of file NestedIntrinsicOperator.h.

71  {
72  auto res = TupleOperation::getChildNodes();
73  for (auto&& x : args) {

References args, and souffle::ram::TupleOperation::getChildNodes().

Here is the call graph for this function:

◆ getChildNodes()

std::vector<const Node*> souffle::ram::NestedIntrinsicOperator::getChildNodes ( ) const
inlineoverridevirtual

Obtain list of all embedded child nodes.

Reimplemented from souffle::ram::Node.

Definition at line 75 of file NestedIntrinsicOperator.h.

◆ getFunction()

NestedIntrinsicOp souffle::ram::NestedIntrinsicOperator::getFunction ( ) const
inline

Definition at line 67 of file NestedIntrinsicOperator.h.

67  {
68  return toPtrVector(args);
69  }

References args, and souffle::toPtrVector().

Here is the call graph for this function:

◆ print()

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

Pretty print with indentation.

Implements souffle::ram::Operation.

Definition at line 96 of file NestedIntrinsicOperator.h.

99  {
100  auto&& other = static_cast<const NestedIntrinsicOperator&>(node);
101  return TupleOperation::equal(node) && op == other.op && equal_targets(args, other.args);

Field Documentation

◆ args

VecOwn<Expression> souffle::ram::NestedIntrinsicOperator::args
protected

Definition at line 109 of file NestedIntrinsicOperator.h.

Referenced by clone(), getArguments(), and getFunction().

◆ op

const NestedIntrinsicOp souffle::ram::NestedIntrinsicOperator::op
protected

Definition at line 112 of file NestedIntrinsicOperator.h.


The documentation for this class was generated from the following file:
souffle::ram::NestedIntrinsicOperator::print
void print(std::ostream &os, int tabpos) const override
Pretty print with indentation.
Definition: NestedIntrinsicOperator.h:96
souffle::ram::NestedIntrinsicOperator::NestedIntrinsicOperator
NestedIntrinsicOperator(NestedIntrinsicOp op, VecOwn< Expression > args, Own< Operation > nested, int ident)
Definition: NestedIntrinsicOperator.h:64
souffle::ram::TupleOperation::getChildNodes
std::vector< const Node * > getChildNodes() const override
Obtain list of all embedded child nodes.
Definition: TupleOperation.h:52
souffle::ram::NestedOperation::apply
void apply(const NodeMapper &map) override
Apply the mapper to all child nodes.
Definition: NestedOperation.h:75
souffle::ram::NestedOperation::getOperation
Operation & getOperation() const
Get nested operation.
Definition: NestedOperation.h:62
souffle::map
auto map(const std::vector< A > &xs, F &&f)
Applies a function to each element of a vector and returns the results.
Definition: ContainerUtil.h:158
souffle::ram::TupleOperation::equal
bool equal(const Node &node) const override
Equality check for two RAM nodes.
Definition: TupleOperation.h:57
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::equal_targets
bool equal_targets(const Container &a, const Container &b, const Comparator &comp)
A function testing whether two containers are equal with the given Comparator.
Definition: ContainerUtil.h:433
souffle::FunctorOp::RANGE
@ RANGE
souffle::ram::TupleOperation::getTupleId
int getTupleId() const
Get identifier.
Definition: TupleOperation.h:43
souffle::ram::NestedIntrinsicOperator::args
VecOwn< Expression > args
Definition: NestedIntrinsicOperator.h:109
souffle::ram::NestedIntrinsicOperator::op
const NestedIntrinsicOp op
Definition: NestedIntrinsicOperator.h:112
souffle::toPtrVector
std::vector< T * > toPtrVector(const std::vector< std::unique_ptr< T >> &v)
A utility function enabling the creation of a vector of pointers.
Definition: ContainerUtil.h:146