ONE - On-device Neural Engine
Loading...
Searching...
No Matches
nnfw::misc::feature::TextFormatter< T > Class Template Reference

Class to print operand of feature to ostream in the given string format. More...

#include <TextFormatter.h>

Public Member Functions

 TextFormatter (const Shape &shape, const Reader< T > &data)
 Construct TextFormatter object with an operand's information.
 
const Shapeshape (void) const
 Get Shape of feature as the lvalue reference.
 
const Reader< T > & data (void) const
 Get Reader<T> that can read the data of an operand.
 

Detailed Description

template<typename T>
class nnfw::misc::feature::TextFormatter< T >

Class to print operand of feature to ostream in the given string format.

Definition at line 43 of file TextFormatter.h.

Constructor & Destructor Documentation

◆ TextFormatter()

template<typename T >
nnfw::misc::feature::TextFormatter< T >::TextFormatter ( const Shape shape,
const Reader< T > &  data 
)
inline

Construct TextFormatter object with an operand's information.

Parameters
[in]shapeThe shape of an operand
[in]dataThe data of an operand

Definition at line 51 of file TextFormatter.h.

51 : _shape(shape), _data(data)
52 {
53 // DO NOTHING
54 }
const Shape & shape(void) const
Get Shape of feature as the lvalue reference.
const Reader< T > & data(void) const
Get Reader<T> that can read the data of an operand.

Member Function Documentation

◆ data()

template<typename T >
const Reader< T > & nnfw::misc::feature::TextFormatter< T >::data ( void  ) const
inline

Get Reader<T> that can read the data of an operand.

Returns
Reader<T>

Definition at line 66 of file TextFormatter.h.

66{ return _data; }

◆ shape()

template<typename T >
const Shape & nnfw::misc::feature::TextFormatter< T >::shape ( void  ) const
inline

Get Shape of feature as the lvalue reference.

Returns
Shape of feature

Definition at line 61 of file TextFormatter.h.

61{ return _shape; }

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


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