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

#include <Tensor.h>

Public Types

using mutable_type = MutableTensor
 
using collection_type = TensorCollection
 

Public Member Functions

 Tensor ()
 default constructor
 
 Tensor (std::int32_t elementType)
 Constructor initializing all members.
 
 Tensor (const Tensor &other)=default
 copy constructor
 
Tensoroperator= (Tensor other)
 copy-assignment operator
 
MutableTensor clone () const
 create a mutable deep-copy of the object with identical relations
 
 ~Tensor ()=default
 destructor
 
std::int32_t getElementType () const
 Access the Data type in the same encoding as "ONNXTensorElementDataType", 1 - float, 7 - int64.
 
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
 
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
 
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 Tensor &other) const
 
bool operator== (const MutableTensor &other) const
 
bool operator< (const Tensor &other) const
 
podio::ObjectID id () const
 
const podio::ObjectID getObjectID () const
 

Static Public Member Functions

static Tensor makeEmpty ()
 

Friends

class MutableTensor
 
class TensorCollection
 
class edm4eic::TensorCollectionData
 
class TensorCollectionIterator
 
void swap (Tensor &a, Tensor &b)
 

Detailed Description

Tensor type for use in training in inference of ML models

Author
: D. Kalinkin

Member Typedef Documentation

◆ collection_type

◆ mutable_type

Constructor & Destructor Documentation

◆ Tensor() [1/3]

edm4eic::Tensor::Tensor ( )

default constructor

◆ Tensor() [2/3]

edm4eic::Tensor::Tensor ( std::int32_t elementType)

Constructor initializing all members.

◆ Tensor() [3/3]

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

copy constructor

◆ ~Tensor()

edm4eic::Tensor::~Tensor ( )
default

destructor

Member Function Documentation

◆ clone()

MutableTensor edm4eic::Tensor::clone ( ) const

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

◆ floatData_begin()

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

◆ floatData_end()

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

◆ floatData_size()

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

◆ getElementType()

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

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

◆ getFloatData() [1/2]

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

◆ getFloatData() [2/2]

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

◆ getInt64Data() [1/2]

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

◆ getInt64Data() [2/2]

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

◆ getObjectID()

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

◆ getShape() [1/2]

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

◆ getShape() [2/2]

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

◆ id()

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

◆ int64Data_begin()

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

◆ int64Data_end()

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

◆ int64Data_size()

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

◆ isAvailable()

bool edm4eic::Tensor::isAvailable ( ) const

check whether the object is actually available

◆ makeEmpty()

Tensor edm4eic::Tensor::makeEmpty ( )
static

◆ operator<()

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

◆ operator=()

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

copy-assignment operator

◆ operator==() [1/2]

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

◆ operator==() [2/2]

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

◆ shape_begin()

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

◆ shape_end()

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

◆ shape_size()

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

◆ unlink()

void edm4eic::Tensor::unlink ( )
inline

disconnect from TensorObj instance

Friends And Related Symbol Documentation

◆ edm4eic::TensorCollectionData

friend class edm4eic::TensorCollectionData
friend

◆ MutableTensor

friend class MutableTensor
friend

◆ swap

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

◆ TensorCollection

friend class TensorCollection
friend

◆ TensorCollectionIterator

friend class TensorCollectionIterator
friend

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