holoscan::TensorSchemaOutputLoan
Hold one atomic set of unpublished provider-backed Tensor field allocations.
The bundle is move-constructible but neither copyable nor assignable. Field write operations borrow the corresponding private loan without allowing individual authority to escape. Destruction abandons every still-live field as one unpublished transaction.
Template parameters
Owning descriptor-backed schema type.
Constructors
TensorSchemaOutputLoan
Move
Overload 3
Copy (deleted)
Transfer the complete unpublished field transaction.
Parameters
Bundle whose authority becomes moved-from.
Destructor
~TensorSchemaOutputLoan
Destroy the bundle and abandon any unpublished field allocations.
Assignment operators
operator=
Deleted overloads
The following overloads are deleted to prevent misuse:
Methods
size
Return the number of fields in this transaction.
Returns: Static schema field count, or zero after the bundle has been moved from.
empty
Return whether this bundle has no live field inventory.
Returns: true after move or for an invalid empty bundle.
shape
Return one field’s allocation shape.
Returns: Borrowed shape view, or an empty view when the selector is not in this bundle.
Parameters
Generated selector for this schema.
memory_kind
Return one field’s concrete memory kind.
Returns: Planned memory kind, or kUnknown for an invalid selector.
Parameters
Generated selector for this schema.
device_id
Return one field’s resolved CUDA device.
Returns: Planned device, or an invalid identity for an invalid selector or host field.
Parameters
Generated selector for this schema.
write_and_commit
Run one CUDA-stream-ordered field write and commit it.
Returns: Success, or a typed selector, state, callback, or commit error.
Template parameters
Callable accepted by TensorOutputLoan::write_and_commit.
Parameters
Generated selector for this schema.
Stream on which producer writes are ordered.
Callback receiving the borrowed field write guard.
write_host_and_commit
Run one host field write and commit it.
Returns: Success, or a typed selector, state, callback, or commit error.
Template parameters
Callable accepted by TensorOutputLoan::write_host_and_commit.
Parameters
Generated selector for this schema.
Callback receiving the borrowed field write guard.
write_all
Preflight, run, and commit one callback for every Tensor field in this bundle.
Selector and inventory rejection occurs before write acquisition and leaves the bundle reusable. Once acquisition begins, an acquisition, callback, or commit failure abandons the transaction: acquired guards and eventual bundle destruction release its unpublished fields, and the bundle cannot be published or retried.
All selectors, placement kinds, and write phases are checked before the first callback. The operation performs no heap allocation or type-erased dispatch on the success path.
Returns: Success after every callback and commit, or the first selector, kind, state, callback, or commit error.
Throws: Any exception propagated by a fill callback. Active writes are abandoned during unwinding.
Template parameters
Typed host or device field-write entry types for this schema.
Parameters
Complete generated field inventory in callback execution order.