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

Static Public Member Functions

static void run (const mir::TensorVariant &arg, const mir::Shape &starts, mir::TensorVariant &res)
 

Detailed Description

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

Definition at line 28 of file Slice.cpp.

Member Function Documentation

◆ run()

template<typename T >
void mir_interpreter::SliceImpl< T >::run ( const mir::TensorVariant arg,
const mir::Shape starts,
mir::TensorVariant res 
)
static

Definition at line 34 of file Slice.cpp.

36{
39
40 for (auto id : mir::ShapeRange(res.getShape()))
41 {
42 mir::Index idx = mir_interpreter::shift(id, starts);
43 output.at(id) = input.at(idx);
44 }
45}
Index shift(const Index &in_index, const Shape &shift_from)
Definition Common.cpp:26
nnfw::cker::Shape getShape(const IPortableTensor *tensor)

References mir::TensorVariant::getShape(), and mir_interpreter::shift().

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


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