Safety Tensor View#

struct SafetyTensorView#

Borrowed fixed-profile IO view. Metadata is immutable after Initialization; data remains writable. Storage and names are borrowed until Deinitialization begins. Outputs require successful execution.

Public Members

std::string_view name#
void *data = {nullptr}#
SafetyTensorDataType dataType = {SafetyTensorDataType::kFLOAT}#
SafetyTensorMemoryPlacement memPlacement = {SafetyTensorMemoryPlacement::kGPU}#
SafetyTensorIOMode ioMode = {SafetyTensorIOMode::kNONE}#
int32_t logicalRank = {-1}#
std::array<int64_t, 8> logicalShape = {}#
int32_t physicalRank = {-1}#
std::array<int64_t, 9> physicalShape = {}#
int32_t strideRank = {-1}#
std::array<int64_t, 9> strides = {}#

Strides count scalar components, not bytes.

int32_t strideOrderRank = {-1}#
std::array<int64_t, 9> strideOrder = {}#
uint64_t bytesPerComponent = {0}#
uint64_t componentsPerVector = {1}#
int64_t vectorizedDim = {-1}#
uint64_t profileBytes = {0}#
uint64_t capacityBytes = {0}#