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

Static Public Member Functions

static void run (const TensorVariant &lhs, const TensorVariant &rhs, TensorVariant &res)
 

Detailed Description

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

Definition at line 28 of file Greater.cpp.

Member Function Documentation

◆ run()

template<typename T >
void mir_interpreter::GreaterImpl< T >::run ( const TensorVariant lhs,
const TensorVariant rhs,
TensorVariant res 
)
static

Definition at line 34 of file Greater.cpp.

35{
36 TensorVariant broadcasted_lhs(lhs, res.getShape());
37 TensorVariant broadcasted_rhs(rhs, res.getShape());
38 Tensor<T> lhs_accessor(broadcasted_lhs);
39 Tensor<T> rhs_accessor(broadcasted_rhs);
40 Tensor<uint8_t> res_accessor(res);
41
42 for (const auto &index : ShapeRange(res.getShape()))
43 {
44 res_accessor.at(index) = (lhs_accessor.at(index) > rhs_accessor.at(index));
45 }
46}
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: