MDL SDK API nvidia_logo_transpbg.gif Up
mi::mdl::IGenerated_code_dag::DAG_node_factory Class Referenceabstract

The node factory for DAG IR nodes. More...

#include <mdl_generated_dag.h>

Public Member Functions

virtual DAG_constant const * create_constant (IValue const *value)=0
 Create a constant. More...
 
virtual DAG_temporary const * create_temporary (DAG_node const *node, int index)=0
 Create a temporary reference. More...
 
virtual DAG_node const * create_call (char const *signature, IDefinition::Semantics sema, DAG_call::Call_argument const call_args[], int num_call_args, IType const *ret_type)=0
 Create a call. More...
 
virtual DAG_parameter const * create_parameter (IType const *type, int index)=0
 Create a parameter reference. More...
 
virtual bool enable_cse (bool flag)=0
 Enable common subexpression elimination. More...
 
virtual bool enable_opt (bool flag)=0
 Enable optimization. More...
 
virtual bool enable_unsafe_math_opt (bool flag)=0
 Enable unsafe math optimizations. More...
 
virtual IType_factory * get_type_factory ()=0
 Get the type factory associated with this expression factory. More...
 
virtual IValue_factory * get_value_factory ()=0
 Get the value factory associated with this expression factory. More...
 

Detailed Description

The node factory for DAG IR nodes.

Member Function Documentation

 create_call()

virtual DAG_node const * mi::mdl::IGenerated_code_dag::DAG_node_factory::create_call ( char const *  signature,
IDefinition::Semantics  sema,
DAG_call::Call_argument const  call_args[],
int  num_call_args,
IType const *  ret_type 
)
pure virtual

Create a call.

Parameters
signatureThe signature of the called function.
semaThe semantics of the called function.
call_argsThe call arguments of the called function.
num_call_argsThe number of call arguments.
ret_typeThe return type of the function.
Returns
The created call or an equivalent expression.

 create_constant()

virtual DAG_constant const * mi::mdl::IGenerated_code_dag::DAG_node_factory::create_constant ( IValue const *  value)
pure virtual

Create a constant.

Parameters
valueThe value of the constant.
Returns
The created constant.

 create_parameter()

virtual DAG_parameter const * mi::mdl::IGenerated_code_dag::DAG_node_factory::create_parameter ( IType const *  type,
int  index 
)
pure virtual

Create a parameter reference.

Parameters
typeThe type of the parameter
indexThe index of the parameter.
Returns
The created parameter reference.

 create_temporary()

virtual DAG_temporary const * mi::mdl::IGenerated_code_dag::DAG_node_factory::create_temporary ( DAG_node const *  node,
int  index 
)
pure virtual

Create a temporary reference.

Parameters
nodeThe DAG node that is "named" by this temporary.
indexThe index of the temporary.
Returns
The created temporary reference.

 enable_cse()

virtual bool mi::mdl::IGenerated_code_dag::DAG_node_factory::enable_cse ( bool  flag)
pure virtual

Enable common subexpression elimination.

Parameters
flagIf true, CSE will be enabled, else disabled.
Returns
The old value of the flag.

 enable_opt()

virtual bool mi::mdl::IGenerated_code_dag::DAG_node_factory::enable_opt ( bool  flag)
pure virtual

Enable optimization.

Parameters
flagIf true, optimizations in general will be enabled, else disabled.
Returns
The old value of the flag.

 enable_unsafe_math_opt()

virtual bool mi::mdl::IGenerated_code_dag::DAG_node_factory::enable_unsafe_math_opt ( bool  flag)
pure virtual

Enable unsafe math optimizations.

Parameters
flagIf true, unsafe math optimizations will be enabled, else disabled.
Returns
The old value of the flag.

 get_type_factory()

virtual IType_factory * mi::mdl::IGenerated_code_dag::DAG_node_factory::get_type_factory ( )
pure virtual

Get the type factory associated with this expression factory.

Returns
The type factory.

 get_value_factory()

virtual IValue_factory * mi::mdl::IGenerated_code_dag::DAG_node_factory::get_value_factory ( )
pure virtual

Get the value factory associated with this expression factory.

Returns
The value factory.