Skip to main content

TensorStorageWrapper::StorageModel

TensorStorageWrapper::StorageModel

Concrete model holding a storage implementation of type T. More…

Inherits from TensorStorageWrapper::StorageConcept

Public Functions

Name
StorageModel(T storage)
float getValueAt(std::span< std::size_t const > indices) const override
std::span< float const > flatData() const override
std::vector< float > sliceAlongAxis(std::size_t axis, std::size_t index) const override
std::vector< float > getColumn(std::size_t col) const override
std::vector< std::size_t > shape() const override
std::size_t totalElements() const override
bool isContiguous() const override
TensorStorageType getStorageType() const override
TensorStorageCache tryGetCache() const override

Public Attributes

Name
T _storage

Detailed Description

template <typename T >
struct TensorStorageWrapper::StorageModel;

Concrete model holding a storage implementation of type T.

Template Parameters:

Forwards all virtual calls to the CRTP methods on T.

Public Functions Documentation

function StorageModel

inline explicit StorageModel(
    T storage
)

function getValueAt

inline float getValueAt(
    std::span< std::size_t const > indices
) const override

function flatData

inline std::span< float const > flatData() const override

function sliceAlongAxis

inline std::vector< float > sliceAlongAxis(
    std::size_t axis,
    std::size_t index
) const override

function getColumn

inline std::vector< float > getColumn(
    std::size_t col
) const override

function shape

inline std::vector< std::size_t > shape() const override

function totalElements

inline std::size_t totalElements() const override

function isContiguous

inline bool isContiguous() const override

function getStorageType

inline TensorStorageType getStorageType() const override

function tryGetCache

inline TensorStorageCache tryGetCache() const override

Public Attributes Documentation

variable _storage

T _storage;

Updated on 2026-11-13 at 20:25:39 +0000