libcudf  23.12.00
Public Member Functions | List of all members
cudf::ast::operation Class Reference

An operation expression holds an operator and zero or more operands. More...

#include <expressions.hpp>

Inheritance diagram for cudf::ast::operation:
cudf::ast::expression

Public Member Functions

 operation (ast_operator op, expression const &input)
 Construct a new unary operation object. More...
 
 operation (ast_operator op, expression const &left, expression const &right)
 Construct a new binary operation object. More...
 
 operation (ast_operator op, expression &&input)=delete
 
 operation (ast_operator op, expression &&left, expression &&right)=delete
 
 operation (ast_operator op, expression &&left, expression const &right)=delete
 
 operation (ast_operator op, expression const &left, expression &&right)=delete
 
ast_operator get_operator () const
 Get the operator. More...
 
std::vector< std::reference_wrapper< expression const > > get_operands () const
 Get the operands. More...
 
cudf::size_type accept (detail::expression_parser &visitor) const override
 Accepts a visitor class. More...
 
std::reference_wrapper< expression const > accept (detail::expression_transformer &visitor) const override
 Accepts a visitor class. More...
 
bool may_evaluate_null (table_view const &left, table_view const &right, rmm::cuda_stream_view stream) const override
 Returns true if the expression may evaluate to null. More...
 
- Public Member Functions inherited from cudf::ast::expression
bool may_evaluate_null (table_view const &left, rmm::cuda_stream_view stream) const
 Returns true if the expression may evaluate to null. More...
 

Detailed Description

An operation expression holds an operator and zero or more operands.

Definition at line 438 of file expressions.hpp.

Constructor & Destructor Documentation

◆ operation() [1/2]

cudf::ast::operation::operation ( ast_operator  op,
expression const &  input 
)

Construct a new unary operation object.

Parameters
opOperator
inputInput expression (operand)

◆ operation() [2/2]

cudf::ast::operation::operation ( ast_operator  op,
expression const &  left,
expression const &  right 
)

Construct a new binary operation object.

Parameters
opOperator
leftLeft input expression (left operand)
rightRight input expression (right operand)

Member Function Documentation

◆ accept() [1/2]

cudf::size_type cudf::ast::operation::accept ( detail::expression_parser &  visitor) const
overridevirtual

Accepts a visitor class.

Parameters
visitorThe expression_parser parsing this expression tree
Returns
Index of device data reference for this instance

Implements cudf::ast::expression.

◆ accept() [2/2]

std::reference_wrapper<expression const> cudf::ast::operation::accept ( detail::expression_transformer &  visitor) const
overridevirtual

Accepts a visitor class.

Parameters
visitorThe expression_parser parsing this expression tree
Returns
Index of device data reference for this instance

Implements cudf::ast::expression.

◆ get_operands()

std::vector<std::reference_wrapper<expression const> > cudf::ast::operation::get_operands ( ) const
inline

Get the operands.

Returns
Vector of operands

Definition at line 476 of file expressions.hpp.

◆ get_operator()

ast_operator cudf::ast::operation::get_operator ( ) const
inline

Get the operator.

Returns
The operator

Definition at line 469 of file expressions.hpp.

◆ may_evaluate_null()

bool cudf::ast::operation::may_evaluate_null ( table_view const &  left,
table_view const &  right,
rmm::cuda_stream_view  stream 
) const
inlineoverridevirtual

Returns true if the expression may evaluate to null.

Parameters
leftThe left operand of the expression
rightThe right operand of the expression
streamCUDA stream used for device memory operations and kernel launches
Returns
true if the expression may evaluate to null, otherwise false

Implements cudf::ast::expression.

Definition at line 489 of file expressions.hpp.


The documentation for this class was generated from the following file: