ONE - On-device Neural Engine
Loading...
Searching...
No Matches
mir_interpreter::FillImpl< T > Struct Template Reference

#include <Fill.h>

Static Public Member Functions

template<typename F >
static void run (mir::TensorVariant &res, F f)
 

Detailed Description

template<typename T>
struct mir_interpreter::FillImpl< T >

Definition at line 28 of file Fill.h.

Member Function Documentation

◆ run()

template<typename T >
template<typename F >
static void mir_interpreter::FillImpl< T >::run ( mir::TensorVariant res,
f 
)
inlinestatic

Definition at line 30 of file Fill.h.

31 {
32 mir::Tensor<T> res_accessor(res);
33
34 for (const auto &index : mir::ShapeRange(res.getShape()))
35 {
36 res_accessor.at(index) = f(index);
37 }
38 }
nnfw::cker::Shape getShape(const IPortableTensor *tensor)

References mir::Tensor< T >::at(), and mir::TensorVariant::getShape().

Referenced by package.infer.session::inference().


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