holoscan::Output< Tensor >
Specialize output publication for shaped Tensor allocation.
Tensor output deliberately omits generic allocate(): direct allocation requires shape, type, and stride metadata and returns one TensorOutputLoan. Existing owning Tensor values and forwarded Tensor samples remain separate pass-through paths.
Inherits from: holoscan::OutputBase (public), holoscan::OutputBase (public)
Methods
Output
Overload 1
Overload 2
Construct an unnamed unbound tensor output declaration.
Destructor
~Output< Tensor >
Destroy this stable Tensor output after all runtime bindings have retired.
allocate_tensor
Overload 1
Overload 2
Request one shaped allocation from the compiled tensor pool.
Returns: Sole tensor loan, or a typed bounds/capacity/state error.
Parameters
Logical shape, element type, and optional byte strides.
emit
Publish one terminal tensor loan attempt.
Returns: Publication result.
Parameters
Sole shaped tensor authority; consumed for success and every error.
Optional semantic metadata.
emit_ref
Encode and publish one ordinary generated schema without copying its native value.
Runtime encodes into owned bounded storage before returning. The caller may then edit, reset, or destroy its value, even while consumers have not yet received the encoded message. Framework-owned sequence, publication time, byte size, and classification are stamped by Runtime. Semantic metadata must be supplied explicitly through options.
The caller retains its value on every outcome. This does not make partial or indeterminate publication retryable; ordinary publication authority rules still apply.
This is not zero-copy transport, input mutation, or an escaping receive loan. It does not require prepared scratch for unchanged pass-through. A generated scratch value is useful for bounded edits; by-value emit still copies an lvalue. Encoder/transport costs remain.
Tensor descriptors are excluded: use emit_tensor or emit_tensors with separately authoritative output loans. Existing owning and generic-loan APIs are unchanged.
Returns: Success after accepted publication, or the same typed publication error as emit.
Parameters
Caller-owned value, unchanged and valid throughout this call, including objects reachable through its shared pointers. No reference to this value escapes the call.
Optional capture time, frame identity, trace, and semantic flags.
allocate
Acquire one already-constructed value from a finite output pool.
This operation never blocks, grows a pool, or falls back to heap allocation.
This overload participates only for supported inline POD or generated-schema payloads that are default-initializable, assignable from T, and no-throw default-constructible and destructible. Other admitted payloads remain available through the ordinary emit(T) path.
Returns: Sole unpublished authority, or an immediate bounded allocation/state error.
emit_tensor
Publish provider-backed Tensor storage with descriptor-schema metadata.
The overload participates only for descriptor-backed Tensor schema payloads. Neither the descriptor object nor its strings may be mutated concurrently with this call.
Returns: Publication result.
Parameters
Sole shaped Tensor authority; consumed for success and every error.
Optional semantic sample metadata.
allocate_tensors
Transactionally request provider-backed storage for every Tensor schema field.
Returns: One sole multi-field publication bundle, or a typed validation, capacity, or state error. No partial bundle escapes on failure.
Parameters
Exactly one generated field selector and shaped request per schema field.
emit_tensors
Publish one provider-backed Tensor field bundle with descriptor-schema metadata.
Returns: Publication result.
Parameters
Sole multi-field authority; consumed for success and every error.
Schema value whose non-Tensor fields are encoded synchronously. Embedded Tensor members are ignored; the bundle fields are authoritative.
Optional semantic sample metadata.
project
Name one Tensor field of this schema output for a Tensor-typed edge.
Returns: Borrowing projection usable as an add_flow source.
Parameters
Generated field constant, such as schema::ImageTensorFields::data.
name
Return the cold declaration name.
Returns: View valid until this port is destroyed.
tensor_output_binding
Return the private shaped-allocation binding for a Tensor-backed output.
Returns: Mutable binding used only by exact typed output specializations.