omni::core::Generated< omni::kit::exec::core::unstable::IExecutionController_abi >

Defined in omni/kit/exec/core/unstable/IExecutionController.gen.h

template<>
class Generated<omni::kit::exec::core::unstable::IExecutionController_abi> : public omni::kit::exec::core::unstable::IExecutionController_abi

omni::kit::exec::core::unstable::IExecutionController encapsulates a omni::graph::exec::unstable::IGraph which helps orchestrates part of the computation for one of Kit’s UsdContext.

See omni::kit::exec::core::unstable::IExecutionControllerFactory.

Subclassed by omni::kit::exec::core::unstable::IExecutionController

Public Functions

inline void compile() noexcept

Populates or updates the internal omni::graph::exec::unstable::IGraph.

Thread Safety

This method is thread safe, but not thread-efficient (i.e., it’s protected with various mutex locks).

inline omni::graph::exec::unstable::Status executeDefinition(omni::core::ObjectParam<omni::graph::exec::unstable::IDef> execDef) noexcept

Searches for the omni::graph::exec::unstable::IDef and executes it. Useful for on-demand execution.

The omni:graph::exec::unstable::Status of the execution of the definition is returned. If the definition is shared by multiple nodes, the definition will be executed at each path and the return status or’d together.

It is up to the caller to ensure the given definition is up-to-date/built.

execDef must not be nullptr or the top-level execution graph’s NodeGraphDef (i.e., the top-level execution graph can only be evaluated using the omni::kit::exec::core::unstable::IExecutionController_abi::execute_abi method).

Thread Safety

This method is thread safe, but not thread-efficient (i.e., it’s protected with various mutex locks).

inline omni::graph::exec::unstable::Status execute(double currentTime, float elapsedSecs, double absoluteSimTime, const omni::kit::StageUpdateSettings *updateSettings) noexcept

Executes the internal graph at the given time.

The execution graph will be compiled (if deemed necessary) before executing.

updateSettings may be nullptr.

Thread Safety

This method is thread safe, but not thread-efficient (i.e., it’s protected with various mutex locks).

inline omni::kit::exec::core::unstable::IExecutionContext *getContext() noexcept

Returns the context owned by this controller.

The returned omni::kit::exec::core::unstable::IExecutionContext will not have omni::core::IObject::acquire() called before being returned.

The returned pointer is always valid.

Thread Safety

This method is thread safe.

inline omni::graph::exec::unstable::IGraph *getGraph() noexcept

Returns the graph owned by this controller.

The returned omni::graph::exec::unstable::IGraph will not have omni::core::IObject::acquire() called before being returned.

The returned pointer is always valid.

Thread Safety

This method is thread safe.

inline void *castWithoutAcquire(omni::core::TypeId id) noexcept

Casts this object to the type described the the given id.

Returns nullptr if the cast was not successful.

Unlike omni::core::IObject::cast(), this casting method does not call omni::core::IObject::acquire().

Thread Safety

This method is thread safe.

inline uint32_t getUseCount() noexcept

Returns the number of different instances (this included) referencing the current object.

Thread Safety

This method is thread safe.

inline void *cast(omni::core::TypeId id) noexcept

Returns a pointer to the interface defined by the given type id if this object implements the type id’s interface.

Objects can support multiple interfaces, even interfaces that are in different inheritance chains.

The returned object will have omni::core::IObject::acquire() called on it before it is returned, meaning it is up to the caller to call omni::core::IObject::release() on the returned pointer.

The returned pointer can be safely reinterpret_cast<> to the type id’s C++ class. For example, “omni.windowing.IWindow” can be cast to omni::windowing::IWindow.

Do not directly use this method, rather use a wrapper function like omni::core::cast() or omni::core::ObjectPtr::as().

Thread Safety

This method is thread safe.

inline void acquire() noexcept

Increments the object’s reference count.

Objects may have multiple reference counts (e.g. one per interface implemented). As such, it is important that you call omni::core::IObject::release() on the same pointer from which you called omni::core::IObject::acquire().

Do not directly use this method, rather use omni::core::ObjectPtr, which will manage calling omni::core::IObject::acquire() and omni::core::IObject::release() for you.

Thread Safety

This method is thread safe.

inline void release() noexcept

Decrements the objects reference count.

Most implementations will destroy the object if the reference count reaches 0 (though this is not a requirement).

Objects may have multiple reference counts (e.g. one per interface implemented). As such, it is important that you call omni::core::IObject::release() on the same pointer from which you called omni::core::IObject::acquire().

Do not directly use this method, rather use omni::core::ObjectPtr, which will manage calling omni::core::IObject::acquire() and omni::core::IObject::release() for you.

Thread Safety

This method is thread safe.

Protected Functions

virtual void compile_abi() noexcept = 0

Populates or updates the internal omni::graph::exec::unstable::IGraph.

Thread Safety

This method is thread safe, but not thread-efficient (i.e., it’s protected with various mutex locks).

virtual omni::graph::exec::unstable::Status executeDefinition_abi(omni::graph::exec::unstable::IDef *execDef) noexcept = 0

Searches for the omni::graph::exec::unstable::IDef and executes it. Useful for on-demand execution.

The omni:graph::exec::unstable::Status of the execution of the definition is returned. If the definition is shared by multiple nodes, the definition will be executed at each path and the return status or’d together.

It is up to the caller to ensure the given definition is up-to-date/built.

execDef must not be nullptr or the top-level execution graph’s NodeGraphDef (i.e., the top-level execution graph can only be evaluated using the omni::kit::exec::core::unstable::IExecutionController_abi::execute_abi method).

Thread Safety

This method is thread safe, but not thread-efficient (i.e., it’s protected with various mutex locks).

virtual omni::graph::exec::unstable::Status execute_abi(double currentTime, float elapsedSecs, double absoluteSimTime, const omni::kit::StageUpdateSettings *updateSettings) noexcept = 0

Executes the internal graph at the given time.

The execution graph will be compiled (if deemed necessary) before executing.

updateSettings may be nullptr.

Thread Safety

This method is thread safe, but not thread-efficient (i.e., it’s protected with various mutex locks).

virtual IExecutionContext *getContext_abi() noexcept = 0

Returns the context owned by this controller.

The returned omni::kit::exec::core::unstable::IExecutionContext will not have omni::core::IObject::acquire() called before being returned.

The returned pointer is always valid.

Thread Safety

This method is thread safe.

virtual omni::graph::exec::unstable::IGraph *getGraph_abi() noexcept = 0

Returns the graph owned by this controller.

The returned omni::graph::exec::unstable::IGraph will not have omni::core::IObject::acquire() called before being returned.

The returned pointer is always valid.

Thread Safety

This method is thread safe.

virtual void schedulePreProcessTask_abi(graph::exec::unstable::IScheduleFunction *fn, const bool persist, const uint64_t moduleHash) noexcept = 0

Schedule a pre-processing function that will run before the next compilation that’s invoked from this controller.

Pre-process tasks can be scheduled at any point in time, and are guaranteed to run in isolation of any other graph compilation, execution and/or post-processing tasks (even in a multithreaded environment where many threads attempt to use an individual controller for graph evaluations).

Typically, pre-process tasks on a controller are used to handle “messy” actions that can potentially affect global state prior to continuing with any compilation/execution actions. For example, OmniGraph utilizes these pre-process tasks in the query compute system to update some internal implementation details so that it remains up-to-date with the execution graph topology.

The given function fn must not be nullptr.

The persist flag allows one to specify whether or not the task should be destructed immediately after being executed. A value of false will result in the task being treated as a one-off (i.e. destroyed after evaluating), while a value of true will result in the task getting evaluated each time before all subsequent graph compilations, until the module (i.e. .dll/.so) in which the task was originally enqueued from gets unloaded.

Thread Safety

This method is thread safe. Note that pre-process tasks are consumed serially and schedulable in parallel.

virtual void schedulePostProcessTask_abi(graph::exec::unstable::IScheduleFunction *fn) noexcept = 0

Schedule a post-processing function that will run after the current execution cycle that was invoked from this controller (either via the omni::kit::exec::core::unstable::IExecutionController::execute or omni::kit::exec::core::unstable::IExecutionController::executeDefinition methods).

Post-process tasks can only be scheduled during execution, and are guaranteed to run in isolation of any other graph compilation, execution and/or pre-processing tasks (even in a multithreaded environment where many threads attempt to use an individual controller for graph evaluations).

Typically, post-process tasks on a controller are used to handle “messy” actions that can potentially affect global state prior to continuing with any execution actions. For example, different modules will use post-process tasks to defer execution graph invalidation/reconstruction if they detect that the graph topology needs to be updated during execution; the deferral is necessary since we cannot invalidate the graph topology from within execution.

The given function must not be nullptr.

Thread Safety

This method is thread safe. Note that post-process tasks are consumed serially and schedulable in parallel.

virtual void *castWithoutAcquire_abi(omni::core::TypeId id) noexcept = 0

Casts this object to the type described the the given id.

Returns nullptr if the cast was not successful.

Unlike omni::core::IObject::cast(), this casting method does not call omni::core::IObject::acquire().

Thread Safety

This method is thread safe.

virtual uint32_t getUseCount_abi() noexcept = 0

Returns the number of different instances (this included) referencing the current object.

Thread Safety

This method is thread safe.

virtual void *cast_abi(TypeId id) noexcept = 0

Returns a pointer to the interface defined by the given type id if this object implements the type id’s interface.

Objects can support multiple interfaces, even interfaces that are in different inheritance chains.

The returned object will have omni::core::IObject::acquire() called on it before it is returned, meaning it is up to the caller to call omni::core::IObject::release() on the returned pointer.

The returned pointer can be safely reinterpret_cast<> to the type id’s C++ class. For example, “omni.windowing.IWindow” can be cast to omni::windowing::IWindow.

Do not directly use this method, rather use a wrapper function like omni::core::cast() or omni::core::ObjectPtr::as().

Thread Safety

This method is thread safe.

virtual void acquire_abi() noexcept = 0

Increments the object’s reference count.

Objects may have multiple reference counts (e.g. one per interface implemented). As such, it is important that you call omni::core::IObject::release() on the same pointer from which you called omni::core::IObject::acquire().

Do not directly use this method, rather use omni::core::ObjectPtr, which will manage calling omni::core::IObject::acquire() and omni::core::IObject::release() for you.

Thread Safety

This method is thread safe.

virtual void release_abi() noexcept = 0

Decrements the objects reference count.

Most implementations will destroy the object if the reference count reaches 0 (though this is not a requirement).

Objects may have multiple reference counts (e.g. one per interface implemented). As such, it is important that you call omni::core::IObject::release() on the same pointer from which you called omni::core::IObject::acquire().

Do not directly use this method, rather use omni::core::ObjectPtr, which will manage calling omni::core::IObject::acquire() and omni::core::IObject::release() for you.

Thread Safety

This method is thread safe.