Turi Create  4.0
turi::lazy_eval_future< T > Class Template Reference

#include <core/storage/lazy_eval/lazy_eval_operation_dag.hpp>

Public Member Functions

 lazy_eval_future ()=delete
 deleted default constructor
 
 lazy_eval_future (const lazy_eval_future &other)=default
 default copy constructor
 
lazy_eval_futureoperator= (const lazy_eval_future &other)=default
 default assignment operator
 
void reset ()
 
value_type & operator() ()
 
std::shared_ptr< value_type > get_ptr ()
 
 ~lazy_eval_future ()
 Destructor.
 
size_t get_vertex_id () const
 Gets the vertex ID in the lazy eval DAG datastructure.
 
bool is_available ()
 

Detailed Description

template<typename T>
class turi::lazy_eval_future< T >

The lazy_eval_future<T> is the key object managed by the lazy_eval_operation_dag. All operations issued to the dag returns a future object. Evaluating the future (using operator()) will evaluate the DAG allowing the object to be accessed efficiently.

Definition at line 35 of file lazy_eval_operation_dag.hpp.

Member Function Documentation

◆ get_ptr()

template<typename T >
std::shared_ptr<value_type> turi::lazy_eval_future< T >::get_ptr ( )
inline

Evaluates the dependencies of this object, caches the result, and returns a a shared pointer to the computed value. If the value has already been cached, no further computation is performed.

Definition at line 73 of file lazy_eval_operation_dag.hpp.

◆ is_available()

template<typename T >
bool turi::lazy_eval_future< T >::is_available ( )
inline

Returns true if the object has been computed.

Definition at line 92 of file lazy_eval_operation_dag.hpp.

◆ operator()()

template<typename T >
value_type& turi::lazy_eval_future< T >::operator() ( )
inline

Evaluates the dependencies of this object, caches the result, and returns a reference to the computed value. If the value has already been cached, no further computation is performed.

Definition at line 62 of file lazy_eval_operation_dag.hpp.

◆ reset()

template<typename T >
void turi::lazy_eval_future< T >::reset ( )
inline

Clears the contents of the future. All shared pointers obtained from the object are still valid.

Definition at line 52 of file lazy_eval_operation_dag.hpp.


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