StorageSpec

data class StorageSpec(val logicalType: LogicalDType, val encoding: TensorEncoding = TensorEncoding.Dense(logicalType.sizeInBytes), val ownership: Ownership = Ownership.OWNED, val placement: Placement = Placement.CPU_HEAP)(source)

A storage specification that captures both logical type AND physical encoding + placement intent. This enables factory routing that goes beyond dtype-only decisions.

StorageSpec replaces the pattern of routing only by DType (via sk.ainet.lang.tensor.data.TensorFactoryRegistry). Existing dtype-based lookups remain as a convenience — they build a default StorageSpec with TensorEncoding.Dense and Ownership.OWNED.

Constructors

Link copied to clipboard
constructor(logicalType: LogicalDType, encoding: TensorEncoding = TensorEncoding.Dense(logicalType.sizeInBytes), ownership: Ownership = Ownership.OWNED, placement: Placement = Placement.CPU_HEAP)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard