Turi Create  4.0
turi::lambda::pylambda_evaluator Class Reference

#include <core/system/lambda/pylambda.hpp>

Public Member Functions

 pylambda_evaluator (turi::shmipc::server *shared_memory_server=nullptr)
 
std::string initialize_shared_memory_comm ()
 

Detailed Description

A functor class wrapping a pickled python lambda string.

The lambda type is assumed to be either: S -> T or or List -> T. where all types should be compatible with flexible_type.

Note
: currently only support basic flexible_types: flex_string, flex_int, flex_float

All public member functions including the constructors are guarded by the global mutex, preventing simultanious access to the python's GIL.

Internally, the class stores a a python lambda object which is created from the pickled lambda string upon construction. The lambda object is equivalent to a python lambda object (with proper reference counting), and therefore, the class is copiable.

Definition at line 129 of file pylambda.hpp.

Constructor & Destructor Documentation

◆ pylambda_evaluator()

turi::lambda::pylambda_evaluator::pylambda_evaluator ( turi::shmipc::server shared_memory_server = nullptr)
inline

Construct an empty evaluator.

Definition at line 135 of file pylambda.hpp.

Member Function Documentation

◆ initialize_shared_memory_comm()

std::string turi::lambda::pylambda_evaluator::initialize_shared_memory_comm ( )

Initializes shared memory communication via SHMIPC. Returns the shared memory address to connect to.


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