ONE - On-device Neural Engine
Loading...
Searching...
No Matches
nnfw::cker::SequentialTensorWriter< T > Class Template Reference

#include <Utils.h>

Public Member Functions

 SequentialTensorWriter (const T *input_data, T *output_data)
 
void Write (int position)
 
void WriteN (int position, int len)
 

Detailed Description

template<typename T>
class nnfw::cker::SequentialTensorWriter< T >

Definition at line 466 of file Utils.h.

Constructor & Destructor Documentation

◆ SequentialTensorWriter()

template<typename T >
nnfw::cker::SequentialTensorWriter< T >::SequentialTensorWriter ( const T *  input_data,
T *  output_data 
)
inline

Definition at line 469 of file Utils.h.

470 : input_data_(input_data), output_ptr_(output_data)
471 {
472 }

Member Function Documentation

◆ Write()

template<typename T >
void nnfw::cker::SequentialTensorWriter< T >::Write ( int  position)
inline

Definition at line 474 of file Utils.h.

474{ *output_ptr_++ = input_data_[position]; }

◆ WriteN()

template<typename T >
void nnfw::cker::SequentialTensorWriter< T >::WriteN ( int  position,
int  len 
)
inline

Definition at line 475 of file Utils.h.

476 {
477 memcpy(output_ptr_, &input_data_[position], sizeof(T) * len);
478 output_ptr_ += len;
479 }

Referenced by nnfw::cker::Slice().


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