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

Static Public Member Functions

static void run (const mir::TensorVariant &arg, mir::TensorVariant &result)
 

Detailed Description

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

Definition at line 28 of file Abs.cpp.

Member Function Documentation

◆ run()

template<typename T >
static void mir_interpreter::AbsImpl< T >::run ( const mir::TensorVariant arg,
mir::TensorVariant result 
)
inlinestatic

Definition at line 30 of file Abs.cpp.

31 {
32 mir::Tensor<T> arg_accessor(arg);
33 mir::Tensor<T> res_accessor(result);
34
35 for (const auto &index : mir::ShapeRange(result.getShape()))
36 {
37 res_accessor.at(index) = std::abs(arg_accessor.at(index));
38 }
39 }
result
Definition infer.py:103
nnfw::cker::Shape getShape(const IPortableTensor *tensor)

References mir::Tensor< T >::at().

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


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