BundleContainer

class omni.graph.core.BundleContainer(context: GraphContext, node: Node, attributes, gpu_bundles: List[str], read_only: bool = False, gpu_ptr_kinds: Optional[Dict[str, PtrToPtrKind]] = None)

Bases: object

—– FOR USE BY GENERATED CODE ONLY —–

Simple container to manage the set of bundle objects used during a compute function by a node. This is initialized alongside attribute data in order to minimize the generated code. It will house a set of BundleContents objects, one per attribute that is a bundle type, with properties named after the attributes they represent

context

Evaluation context for these bundles

Type

GraphContext

node

Owner of these bundles

Type

Node

attributes

Subset of node attributes to check for being bundles

Type

list[Attribute]

gpu_bundles

Subset of bundle attributes whose memory lives on the GPU

Type

list[str]

read_only

True if these attributes are read-only

Type

bool

gpu_ptr_kinds

Attribute array pointer locations for GPU-based array attributes

Type

dict[str, PtrToPtrKind]

Methods

__init__(context, node, attributes, gpu_bundles)

Set up the list of members based on the list of node attributes.

__init__(context: GraphContext, node: Node, attributes, gpu_bundles: List[str], read_only: bool = False, gpu_ptr_kinds: Optional[Dict[str, PtrToPtrKind]] = None)

Set up the list of members based on the list of node attributes. These will usually be a subset, e.g. just the inputs, to keep the higher level access simple

Parameters
  • context (GraphContext) – Evaluation context for these bundles

  • node (Node) – Owner of these bundles

  • attributes (list[Attribute]) – Subset of node attributes to check for being bundles

  • gpu_bundles (list[str]) – Subset of bundle attributes whose memory lives on the GPU

  • read_only (bool) – True if these attributes are read-only

  • gpu_ptr_kinds (dict[str, PtrToPtrKind]) – Attribute array pointer locations for GPU-based array attributes