46void GlobalContext::make_handle(ObjectId
id,
const std::string &name,
52 m_local_objects[id] = std::move(
so);
53 }
catch (Exception
const &) {
57void GlobalContext::remote_make_handle(ObjectId
id,
const std::string &name,
62void GlobalContext::set_parameter(ObjectId
id, std::string
const &name,
65 m_local_objects.at(
id)->set_parameter(
name,
unpack(value, m_local_objects));
66 }
catch (Exception
const &) {
71 std::string
const &name,
76void GlobalContext::call_method(
ObjectId id, std::string
const &name,
79 m_local_objects.at(
id)->call_method(
name,
81 }
catch (Exception
const &) {
86 std::string
const &name,
91std::shared_ptr<ObjectHandle>
95 auto sp = m_node_local_context->factory().make(
name);
103 return {
sp.release(),
121 return m_node_local_context->factory().type_name(*
o);
Infrastructure to synchronize objects created on the head node with their corresponding remote copies...
void set_context(ObjectHandle *o)
Set the context of an object to this.
std::shared_ptr< ObjectHandle > make_shared(std::string const &name, const VariantMap ¶meters) override
Get a new reference counted instance of a script interface object by name.
void notify_set_parameter(const ObjectHandle *o, std::string const &name, Variant const &value) override
std::string_view name(const ObjectHandle *o) const override
bool is_head_node() const override
void notify_call_method(const ObjectHandle *o, std::string const &name, VariantMap const &arguments) override
Base class for interface handles.
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
make_recursive_variant< ObjectId > PackedVariant
Packed version of Variant.
PackedVariant pack(const Variant &v)
Transform a Variant to a PackedVariant.
std::shared_ptr< ObjectHandle > ObjectRef
std::unordered_map< std::string, Variant > VariantMap
std::vector< std::pair< std::string, PackedVariant > > PackedMap
Variant unpack(const PackedVariant &v, std::unordered_map< ObjectId, ObjectRef > const &objects)
Unpack a PackedVariant.
Strongly typed integer type to hold a unique identifier for a ObjectHandle object,...
Recursive variant implementation.