Caffe2 - C++ API
A deep learning, cross platform ML framework
Data Structures | Public Types | Public Member Functions | Static Public Member Functions | Friends
c10::ivalue Struct Reference
Inheritance diagram for c10::ivalue:

Data Structures

struct  FutureError
 

Public Types

template<typename T >
using Shared = c10::intrusive_ptr< T >
 
using UnorderedMap = std::unordered_map< IValue, IValue, DictHash, DictEqualTo >
 
using IntList = List< int64_t >
 
using TensorList = List< at::Tensor >
 
using DoubleList = List< double >
 
using BoolList = List< bool >
 
using GenericList = List< IValue >
 

Public Member Functions

void wait ()
 Wait on the future until it completes.
 
void markCompleted (IValue value)
 Explicitly mark the future as completed with the output value.
 
void markCompleted (FutureError &&error_)
 
IValue value ()
 
void addCallback (std::function< void(void)> callback)
 Add a callback to the future. More...
 
bool completed ()
 
 Object (Symbol name, size_t numSlots)
 
void setSlot (size_t slot, IValue v)
 
IValue getSlot (size_t slot) const
 
Symbol name () const
 
 GenericDict (UnorderedMap elements_)
 
const UnorderedMap & elements () const
 
 operator const UnorderedMap & () const
 
UnorderedMap & elements ()
 
 operator UnorderedMap & ()
 

Static Public Member Functions

static c10::intrusive_ptr< Object > create (Symbol name, size_t numSlots)
 
static c10::intrusive_ptr< GenericDict > create (UnorderedMap elements_)
 

Friends

CAFFE2_API friend std::ostream & operator<< (std::ostream &out, const Future &v)
 

Detailed Description

Definition at line 548 of file ivalue.h.

Member Function Documentation

void c10::ivalue::addCallback ( std::function< void(void)>  callback)
inline

Add a callback to the future.

The callbacks will be executed once the future completes. If the future has already completed, this function will execute the callback immediately.

Definition at line 645 of file ivalue.h.


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