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

A Builder for DAG graphs. More...

#include <mdl_generated_dag.h>

Inheritance diagram for mi::mdl::IDag_builder:

Public Member Functions

virtual IType_factory * get_type_factory ()=0
 Get the type factory of this instance. More...
 
virtual IValue_factory * get_value_factory ()=0
 Get the value factory of this instance. More...
 
virtual DAG_constant const * create_constant (IValue const *value)=0
 Create a constant. 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...
 
- Public Member Functions inherited from mi::base::IInterface
virtual Uint32 retain () const =0
 Increments the reference count. More...
 
virtual Uint32 release () const =0
 Decrements the reference count. More...
 
virtual const IInterfaceget_interface (const Uuid &interface_id) const =0
 Acquires a const interface from another. More...
 
template<class T>
const T * get_interface () const
 Acquires a const interface from another. More...
 
virtual IInterfaceget_interface (const Uuid &interface_id)=0
 Acquires a mutable interface from another. More...
 
template<class T>
T * get_interface ()
 Acquires a mutable interface from another. More...
 
virtual Uuid get_iid () const =0
 Returns the interface ID of the most derived interface. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x01dbe5fb, ... >
typedef Interface_declare< id1, ... > Self
 Own type. More...
 
typedef Uuid_t< id1, ... > IID
 Declares the interface ID (IID) of this interface. More...
 
- Public Types inherited from mi::base::IInterface
typedef Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> IID
 Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x01dbe5fb, ... >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 
- Static Public Member Functions inherited from mi::base::IInterface
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface. More...
 

Detailed Description

A Builder for DAG graphs.

This interface is implemented by various entities that can build DAG IR representations.

Note that there is no way to create temporaries here. Temporaries are not meant to be created by a user, but are automatically created by the DAG IR optimizer if requested.

Member Function Documentation

 create_call()

virtual DAG_node const * mi::mdl::IDag_builder::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 semantic 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 called function.
Returns
The created call.

 create_constant()

virtual DAG_constant const * mi::mdl::IDag_builder::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::IDag_builder::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.

 enable_cse()

virtual bool mi::mdl::IDag_builder::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::IDag_builder::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::IDag_builder::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::IDag_builder::get_type_factory ( )
pure virtual

Get the type factory of this instance.

 get_value_factory()

virtual IValue_factory * mi::mdl::IDag_builder::get_value_factory ( )
pure virtual

Get the value factory of this instance.