Graph Framework
Loading...
Searching...
No Matches
dummy Class Reference

Dummy node. More...

Inheritance diagram for dummy:
graph::no_derivative< float, false, graph::leaf_node< float, false > > graph::leaf_node< float, false >

Public Member Functions

 dummy ()
 A dummy constructor.
virtual backend::buffer< float > evaluate ()
 Dummy evaluate method.
virtual graph::shared_leaf< float > compile (std::ostringstream &stream, jit::register_map &registers, const jit::register_map &thread_mem, const jit::register_usage &usage)
 Dummy reduce method.
virtual graph::shared_leaf< float > to_vizgraph (std::stringstream &stream, jit::register_map &registers)
 Dummy to vizgraph method.
virtual graph::shared_leaf< float > get_power_exponent () const
 Dummy get power exponent method.
Public Member Functions inherited from graph::no_derivative< float, false, graph::leaf_node< float, false > >
std::shared_ptr< leaf_node< T, SAFE_MATH > > df (std::shared_ptr< leaf_node< T, SAFE_MATH > > x)
 Transform node to derivative.
 no_derivative (const std::string s)
 Constructor for base leaf nodes base classes.
Public Member Functions inherited from graph::leaf_node< float, false >
 leaf_node (const std::string s, const size_t count, const bool pseudo)
 Construct a basic node.
virtual ~leaf_node ()
 Destructor.
virtual std::shared_ptr< leaf_node< T, SAFE_MATH > > reduce ()
 Reduction method.
virtual void compile_preamble (std::ostringstream &stream, jit::register_map &registers, jit::visiter_map &visited, jit::register_usage &usage, jit::texture1d_list &textures1d, jit::texture2d_list &textures2d, jit::preamble_map &pre_funcs, int &avail_const_mem)
 Compile preamble.
virtual bool is_match (std::shared_ptr< leaf_node< T, SAFE_MATH > > x)
 Query if the nodes match.
bool is_power_base_match (std::shared_ptr< leaf_node< T, SAFE_MATH > > x)
 Check if the base of the powers match.
virtual void set (const T d)
 Set the value of variable data.
virtual void to_latex () const
 Convert the node to latex.
virtual bool is_constant () const
 Test if node is a constant.
virtual bool has_constant_zero () const
 Test the constant node has a zero.
bool is_normal ()
 Test if the result is normal.
virtual bool is_all_variables () const
 Test if all the sub-nodes terminate in variables.
virtual bool is_power_like () const
 Test if the node acts like a power of variable.
virtual std::shared_ptr< leaf_node< T, SAFE_MATH > > get_power_base ()
 Get the base of a power.
size_t get_hash () const
 Get the hash for the node.
size_t get_complexity () const
 Get the number of nodes in the subgraph.
virtual bool has_pseudo () const
 Query if the node contains pseudo variables.
virtual std::shared_ptr< leaf_node< T, SAFE_MATH > > remove_pseudo ()
 Remove pseudo variable nodes.
virtual void endline (std::ostringstream &stream, const jit::register_usage &usage, const char end=';') const
 End a line in the kernel source.

Additional Inherited Members

Public Types inherited from graph::leaf_node< float, false >
typedef T base
 Type def to retrieve the backend type.
Static Public Attributes inherited from graph::leaf_node< float, false >
static caches_t caches
 A per thread instance of the cache structure.
Protected Attributes inherited from graph::leaf_node< float, false >
const size_t hash
 Hash for node.
const size_t complexity
 Graph complexity.
std::unordered_map< size_t, std::shared_ptr< leaf_node< T, SAFE_MATH > > > df_cache
 Cache derivative terms.
const bool contains_pseudo
 Node contains pseudo variables.

Detailed Description

Dummy node.

Member Function Documentation

◆ compile()

virtual graph::shared_leaf< float > dummy::compile ( std::ostringstream & stream,
jit::register_map & registers,
const jit::register_map & thread_mem,
const jit::register_usage & usage )
inlinevirtual

Dummy reduce method.

Returns
Returns the dummy node.

Implements graph::leaf_node< float, false >.

◆ evaluate()

virtual backend::buffer< float > dummy::evaluate ( )
inlinevirtual

Dummy evaluate method.

Returns
An empty buffer.

Implements graph::leaf_node< float, false >.

◆ get_power_exponent()

virtual graph::shared_leaf< float > dummy::get_power_exponent ( ) const
inlinevirtual

Dummy get power exponent method.

Returns
One.

Implements graph::leaf_node< float, false >.

◆ to_vizgraph()

virtual graph::shared_leaf< float > dummy::to_vizgraph ( std::stringstream & stream,
jit::register_map & registers )
inlinevirtual

Dummy to vizgraph method.

Returns
A reference to this.

Implements graph::leaf_node< float, false >.


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