LiteRTBufferRequirements

data class LiteRTBufferRequirements(val supportedTypes: List<LiteRTTensorBufferType>, val bufferSize: Int, val strides: List<Int>)

Describes the memory requirements for creating a tensor buffer.

This information is provided by the runtime and can be used to allocate a compatible buffer for model inputs or outputs.

Constructors

Link copied to clipboard
constructor(supportedTypes: List<LiteRTTensorBufferType>, bufferSize: Int, strides: List<Int>)

Properties

Link copied to clipboard

The required buffer size in bytes.

Link copied to clipboard

The stride of each dimension in bytes. An empty list indicates that the tensor is tightly packed and uses the default contiguous memory layout.

Link copied to clipboard

The tensor buffer types supported by the runtime for this tensor. The first supported type is typically the preferred one.