EDM4eic
EIC data model
Loading...
Searching...
No Matches
edm4eic::MutableTensor Class Reference

#include <MutableTensor.h>

Public Types

using object_type = Tensor
 
using collection_type = TensorCollection
 

Public Member Functions

 MutableTensor ()
 default constructor
 
 MutableTensor (std::int32_t elementType)
 Constructor initializing all members.
 
 MutableTensor (const MutableTensor &other)=default
 copy constructor
 
MutableTensoroperator= (MutableTensor other)
 copy-assignment operator
 
MutableTensor clone () const
 create a mutable deep-copy of the object with identical relations
 
 ~MutableTensor ()=default
 destructor
 
 operator Tensor () const
 conversion to const object
 
std::int32_t getElementType () const
 Access the Data type in the same encoding as "ONNXTensorElementDataType", 1 - float, 7 - int64.
 
void setElementType (std::int32_t value)
 Set the Data type in the same encoding as "ONNXTensorElementDataType", 1 - float, 7 - int64.
 
void addToShape (std::int64_t)
 
std::size_t shape_size () const
 
std::int64_t getShape (std::size_t) const
 
std::vector< std::int64_t >::const_iterator shape_begin () const
 
std::vector< std::int64_t >::const_iterator shape_end () const
 
podio::RelationRange< std::int64_t > getShape () const
 
void addToFloatData (float)
 
std::size_t floatData_size () const
 
float getFloatData (std::size_t) const
 
std::vector< float >::const_iterator floatData_begin () const
 
std::vector< float >::const_iterator floatData_end () const
 
podio::RelationRange< float > getFloatData () const
 
void addToInt64Data (std::int64_t)
 
std::size_t int64Data_size () const
 
std::int64_t getInt64Data (std::size_t) const
 
std::vector< std::int64_t >::const_iterator int64Data_begin () const
 
std::vector< std::int64_t >::const_iterator int64Data_end () const
 
podio::RelationRange< std::int64_t > getInt64Data () const
 
bool isAvailable () const
 check whether the object is actually available
 
void unlink ()
 disconnect from TensorObj instance
 
bool operator== (const MutableTensor &other) const
 
bool operator== (const Tensor &other) const
 
bool operator< (const MutableTensor &other) const
 
podio::ObjectID id () const
 
const podio::ObjectID getObjectID () const
 

Friends

class TensorCollection
 
class TensorMutableCollectionIterator
 
class Tensor
 
void swap (MutableTensor &a, MutableTensor &b)
 

Detailed Description

Tensor type for use in training in inference of ML models

Author
: D. Kalinkin

Member Typedef Documentation

◆ collection_type

◆ object_type

Constructor & Destructor Documentation

◆ MutableTensor() [1/3]

edm4eic::MutableTensor::MutableTensor ( )

default constructor

◆ MutableTensor() [2/3]

edm4eic::MutableTensor::MutableTensor ( std::int32_t elementType)

Constructor initializing all members.

◆ MutableTensor() [3/3]

edm4eic::MutableTensor::MutableTensor ( const MutableTensor & other)
default

copy constructor

◆ ~MutableTensor()

edm4eic::MutableTensor::~MutableTensor ( )
default

destructor

Member Function Documentation

◆ addToFloatData()

void edm4eic::MutableTensor::addToFloatData ( float component)

◆ addToInt64Data()

void edm4eic::MutableTensor::addToInt64Data ( std::int64_t component)

◆ addToShape()

void edm4eic::MutableTensor::addToShape ( std::int64_t component)

◆ clone()

MutableTensor edm4eic::MutableTensor::clone ( ) const

create a mutable deep-copy of the object with identical relations

◆ floatData_begin()

std::vector< float >::const_iterator edm4eic::MutableTensor::floatData_begin ( ) const

◆ floatData_end()

std::vector< float >::const_iterator edm4eic::MutableTensor::floatData_end ( ) const

◆ floatData_size()

std::size_t edm4eic::MutableTensor::floatData_size ( ) const

◆ getElementType()

std::int32_t edm4eic::MutableTensor::getElementType ( ) const

Access the Data type in the same encoding as "ONNXTensorElementDataType", 1 - float, 7 - int64.

◆ getFloatData() [1/2]

podio::RelationRange< float > edm4eic::MutableTensor::getFloatData ( ) const

◆ getFloatData() [2/2]

float edm4eic::MutableTensor::getFloatData ( std::size_t index) const

◆ getInt64Data() [1/2]

podio::RelationRange< std::int64_t > edm4eic::MutableTensor::getInt64Data ( ) const

◆ getInt64Data() [2/2]

std::int64_t edm4eic::MutableTensor::getInt64Data ( std::size_t index) const

◆ getObjectID()

const podio::ObjectID edm4eic::MutableTensor::getObjectID ( ) const

◆ getShape() [1/2]

podio::RelationRange< std::int64_t > edm4eic::MutableTensor::getShape ( ) const

◆ getShape() [2/2]

std::int64_t edm4eic::MutableTensor::getShape ( std::size_t index) const

◆ id()

podio::ObjectID edm4eic::MutableTensor::id ( ) const
inline

◆ int64Data_begin()

std::vector< std::int64_t >::const_iterator edm4eic::MutableTensor::int64Data_begin ( ) const

◆ int64Data_end()

std::vector< std::int64_t >::const_iterator edm4eic::MutableTensor::int64Data_end ( ) const

◆ int64Data_size()

std::size_t edm4eic::MutableTensor::int64Data_size ( ) const

◆ isAvailable()

bool edm4eic::MutableTensor::isAvailable ( ) const

check whether the object is actually available

◆ operator Tensor()

edm4eic::MutableTensor::operator Tensor ( ) const

conversion to const object

◆ operator<()

bool edm4eic::MutableTensor::operator< ( const MutableTensor & other) const
inline

◆ operator=()

MutableTensor & edm4eic::MutableTensor::operator= ( MutableTensor other)

copy-assignment operator

◆ operator==() [1/2]

bool edm4eic::MutableTensor::operator== ( const MutableTensor & other) const
inline

◆ operator==() [2/2]

bool edm4eic::MutableTensor::operator== ( const Tensor & other) const

◆ setElementType()

void edm4eic::MutableTensor::setElementType ( std::int32_t value)

Set the Data type in the same encoding as "ONNXTensorElementDataType", 1 - float, 7 - int64.

◆ shape_begin()

std::vector< std::int64_t >::const_iterator edm4eic::MutableTensor::shape_begin ( ) const

◆ shape_end()

std::vector< std::int64_t >::const_iterator edm4eic::MutableTensor::shape_end ( ) const

◆ shape_size()

std::size_t edm4eic::MutableTensor::shape_size ( ) const

◆ unlink()

void edm4eic::MutableTensor::unlink ( )
inline

disconnect from TensorObj instance

Friends And Related Symbol Documentation

◆ swap

void swap ( MutableTensor & a,
MutableTensor & b )
friend

◆ Tensor

friend class Tensor
friend

◆ TensorCollection

friend class TensorCollection
friend

◆ TensorMutableCollectionIterator

friend class TensorMutableCollectionIterator
friend

The documentation for this class was generated from the following files: