omni::graph::exec::unstable::IExecutor_abi

Defined in omni/graph/exec/unstable/IExecutor.h

class IExecutor_abi : public omni::core::Inherits<omni::graph::exec::unstable::IBase, OMNI_TYPE_ID("omni.graph.exec.unstable.IExecutor")>

Executes the nodes in a graph definition.

The purpose of an executor is to generate work for the nodes in an graph definition. omni::graph::exec::unstable::IExecutor is a minimal interface that defines enough methods to accomplish just that.

However, omni::graph::exec::unstable::IExecutor’s minimal nature is not what most users want when customizing execution for their graph definitions. Rather, they want something useful. omni::graph::exec::unstable::Executor is an useful implementation of omni::graph::exec::unstable::IExecutor designed for graph definition authors to extend. See omni::graph::exec::unstable::Executor’s documentation to better understand the purpose, duties, and capabilities of an executor.

See Execution Concepts for an in-depth guide on how this object is used during execution.

See Creating an Executor for a guide on creating a customize executor for your graph defintion.

Thread Safety

There are no thread safety requirements for executors. It is up to the executor implementor to decide if an executor should process nodes in parallel or serially. Likewise, it is up to the graph definition implementor to instantiate and use a concrete implementation of omni::graph::exec::unstable::IExecutor in a manner meeting the concrete implementation’s threading requirements.

Subclassed by omni::core::Generated< omni::graph::exec::unstable::IExecutor_abi >

Public Functions

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 Status execute_abi() noexcept = 0

Main execute method. Returning status of the execution.

In practice, what is executed will be defined in the concrete implementation’s constructor.

See Error Handling to understand the error handling/reporting responsibilities of implementors of this method.

Thread Safety

See thread safety information in interface description.

virtual Status schedule_abi(IScheduleFunction *fn, SchedulingInfo schedInfo) noexcept = 0

Request for scheduling of additional work generated during execution of a task.

See Error Handling to understand the error handling/reporting responsibilities of implementors of this method.

Thread Safety

See thread safety information in interface description.

Parameters
  • fn – Function to call once the work is dispatched.

  • schedInfo – Scheduling constraints to use when dispatching this work.

virtual Status continueExecute_abi(ExecutionTask *task) noexcept = 0

Request for scheduling of additional work after the given task has executed but before it has completed.

See Error Handling to understand the error handling/reporting responsibilities of implementors of this method.

Thread Safety

See thread safety information in interface description.

Parameters

task – The current task. Must not be nullptr.

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.