ONE - On-device Neural Engine
Loading...
Searching...
No Matches
circle_eval_diff::TensorShape Struct Reference

#include <Tensor.h>

Public Member Functions

uint32_t rank (void) const
 
void rank (uint32_t value)
 
const loco::Dimensiondim (uint32_t axis) const
 
loco::Dimensiondim (uint32_t axis)
 
void shape (std::initializer_list< uint32_t > dims)
 

Detailed Description

Definition at line 38 of file Tensor.h.

Member Function Documentation

◆ dim() [1/2]

loco::Dimension & circle_eval_diff::TensorShape::dim ( uint32_t  axis)
inline

Definition at line 45 of file Tensor.h.

45{ return _dims.at(axis); }

◆ dim() [2/2]

const loco::Dimension & circle_eval_diff::TensorShape::dim ( uint32_t  axis) const
inline

◆ rank() [1/2]

void circle_eval_diff::TensorShape::rank ( uint32_t  value)
inline

Definition at line 42 of file Tensor.h.

42{ _dims.resize(value); }

◆ rank() [2/2]

uint32_t circle_eval_diff::TensorShape::rank ( void  ) const
inline

Definition at line 41 of file Tensor.h.

41{ return _dims.size(); }

Referenced by shape().

◆ shape()

void circle_eval_diff::TensorShape::shape ( std::initializer_list< uint32_t >  dims)
inline

Definition at line 47 of file Tensor.h.

48 {
49 rank(dims.size());
50
51 uint32_t axis = 0;
52 for (auto d : dims)
53 {
54 dim(axis++) = d;
55 }
56 }
const loco::Dimension & dim(uint32_t axis) const
Definition Tensor.h:44
uint32_t rank(void) const
Definition Tensor.h:41

References dim(), and rank().

Referenced by RandomDataGenerator.RandomDataGenerator::_gen_float32(), RandomDataGenerator.RandomDataGenerator::_gen_int16(), and RandomDataGenerator.RandomDataGenerator::_gen_uint8().


The documentation for this struct was generated from the following file: