Lines Matching refs:context
74 bool executeLessTyped(IOperationExecutionContext* context) { in executeLessTyped() argument
76 std::less<ComparisonType>(), context->getInputBuffer<DataType>(kInputTensor1), in executeLessTyped()
77 context->getInputShape(kInputTensor1), context->getInputBuffer<DataType>(kInputTensor2), in executeLessTyped()
78 context->getInputShape(kInputTensor2), context->getOutputBuffer<bool8>(kOutputTensor), in executeLessTyped()
79 context->getOutputShape(kOutputTensor)); in executeLessTyped()
83 bool executeLessEqualTyped(IOperationExecutionContext* context) { in executeLessEqualTyped() argument
85 std::less_equal<ComparisonType>(), context->getInputBuffer<DataType>(kInputTensor1), in executeLessEqualTyped()
86 context->getInputShape(kInputTensor1), context->getInputBuffer<DataType>(kInputTensor2), in executeLessEqualTyped()
87 context->getInputShape(kInputTensor2), context->getOutputBuffer<bool8>(kOutputTensor), in executeLessEqualTyped()
88 context->getOutputShape(kOutputTensor)); in executeLessEqualTyped()
92 bool executeEqualTyped(IOperationExecutionContext* context) { in executeEqualTyped() argument
94 std::equal_to<ComparisonType>(), context->getInputBuffer<DataType>(kInputTensor1), in executeEqualTyped()
95 context->getInputShape(kInputTensor1), context->getInputBuffer<DataType>(kInputTensor2), in executeEqualTyped()
96 context->getInputShape(kInputTensor2), context->getOutputBuffer<bool8>(kOutputTensor), in executeEqualTyped()
97 context->getOutputShape(kOutputTensor)); in executeEqualTyped()
101 bool executeNotEqualTyped(IOperationExecutionContext* context) { in executeNotEqualTyped() argument
103 std::not_equal_to<ComparisonType>(), context->getInputBuffer<DataType>(kInputTensor1), in executeNotEqualTyped()
104 context->getInputShape(kInputTensor1), context->getInputBuffer<DataType>(kInputTensor2), in executeNotEqualTyped()
105 context->getInputShape(kInputTensor2), context->getOutputBuffer<bool8>(kOutputTensor), in executeNotEqualTyped()
106 context->getOutputShape(kOutputTensor)); in executeNotEqualTyped()
110 bool executeGreaterEqualTyped(IOperationExecutionContext* context) { in executeGreaterEqualTyped() argument
112 std::greater_equal<ComparisonType>(), context->getInputBuffer<DataType>(kInputTensor1), in executeGreaterEqualTyped()
113 context->getInputShape(kInputTensor1), context->getInputBuffer<DataType>(kInputTensor2), in executeGreaterEqualTyped()
114 context->getInputShape(kInputTensor2), context->getOutputBuffer<bool8>(kOutputTensor), in executeGreaterEqualTyped()
115 context->getOutputShape(kOutputTensor)); in executeGreaterEqualTyped()
119 bool executeGreaterTyped(IOperationExecutionContext* context) { in executeGreaterTyped() argument
121 std::greater<ComparisonType>(), context->getInputBuffer<DataType>(kInputTensor1), in executeGreaterTyped()
122 context->getInputShape(kInputTensor1), context->getInputBuffer<DataType>(kInputTensor2), in executeGreaterTyped()
123 context->getInputShape(kInputTensor2), context->getOutputBuffer<bool8>(kOutputTensor), in executeGreaterTyped()
124 context->getOutputShape(kOutputTensor)); in executeGreaterTyped()
129 bool validate(const IOperationValidationContext* context) { in validate() argument
130 NN_RET_CHECK_EQ(context->getNumInputs(), kNumInputs); in validate()
131 NN_RET_CHECK_EQ(context->getNumOutputs(), kNumOutputs); in validate()
132 OperandType inputType = context->getInputType(kInputTensor1); in validate()
139 NN_RET_CHECK(validateInputTypes(context, {inputType, inputType})); in validate()
140 NN_RET_CHECK(validateOutputTypes(context, {OperandType::TENSOR_BOOL8})); in validate()
142 return validateHalVersion(context, HalVersion::V1_3); in validate()
144 return validateHalVersion(context, HalVersion::V1_2); in validate()
148 bool prepare(IOperationExecutionContext* context) { in prepare() argument
149 Shape input1 = context->getInputShape(kInputTensor1); in prepare()
150 Shape input2 = context->getInputShape(kInputTensor2); in prepare()
151 Shape output = context->getOutputShape(kOutputTensor); in prepare()
153 return context->setOutputShape(kOutputTensor, output); in prepare()
156 bool executeLess(IOperationExecutionContext* context) { in executeLess() argument
157 switch (context->getInputType(kInputTensor1)) { in executeLess()
159 return executeLessTyped<_Float16, _Float16>(context); in executeLess()
161 return executeLessTyped<float, float>(context); in executeLess()
163 return executeLessTyped<int32_t, int32_t>(context); in executeLess()
165 return executeLessTyped<uint8_t, float>(context); in executeLess()
167 return executeLessTyped<int8_t, float>(context); in executeLess()
169 return executeLessTyped<bool8, bool8>(context); in executeLess()
175 bool executeLessEqual(IOperationExecutionContext* context) { in executeLessEqual() argument
176 switch (context->getInputType(kInputTensor1)) { in executeLessEqual()
178 return executeLessEqualTyped<_Float16, _Float16>(context); in executeLessEqual()
180 return executeLessEqualTyped<float, float>(context); in executeLessEqual()
182 return executeLessEqualTyped<int32_t, int32_t>(context); in executeLessEqual()
184 return executeLessEqualTyped<uint8_t, float>(context); in executeLessEqual()
186 return executeLessEqualTyped<int8_t, float>(context); in executeLessEqual()
188 return executeLessEqualTyped<bool8, bool8>(context); in executeLessEqual()
194 bool executeEqual(IOperationExecutionContext* context) { in executeEqual() argument
195 switch (context->getInputType(kInputTensor1)) { in executeEqual()
197 return executeEqualTyped<_Float16, _Float16>(context); in executeEqual()
199 return executeEqualTyped<float, float>(context); in executeEqual()
201 return executeEqualTyped<int32_t, int32_t>(context); in executeEqual()
203 return executeEqualTyped<uint8_t, float>(context); in executeEqual()
205 return executeEqualTyped<int8_t, float>(context); in executeEqual()
207 return executeEqualTyped<bool8, bool8>(context); in executeEqual()
213 bool executeNotEqual(IOperationExecutionContext* context) { in executeNotEqual() argument
214 switch (context->getInputType(kInputTensor1)) { in executeNotEqual()
216 return executeNotEqualTyped<_Float16, _Float16>(context); in executeNotEqual()
218 return executeNotEqualTyped<float, float>(context); in executeNotEqual()
220 return executeNotEqualTyped<int32_t, int32_t>(context); in executeNotEqual()
222 return executeNotEqualTyped<uint8_t, float>(context); in executeNotEqual()
224 return executeNotEqualTyped<int8_t, float>(context); in executeNotEqual()
226 return executeNotEqualTyped<bool8, bool8>(context); in executeNotEqual()
232 bool executeGreaterEqual(IOperationExecutionContext* context) { in executeGreaterEqual() argument
233 switch (context->getInputType(kInputTensor1)) { in executeGreaterEqual()
235 return executeGreaterEqualTyped<_Float16, _Float16>(context); in executeGreaterEqual()
237 return executeGreaterEqualTyped<float, float>(context); in executeGreaterEqual()
239 return executeGreaterEqualTyped<int32_t, int32_t>(context); in executeGreaterEqual()
241 return executeGreaterEqualTyped<uint8_t, float>(context); in executeGreaterEqual()
243 return executeGreaterEqualTyped<int8_t, float>(context); in executeGreaterEqual()
245 return executeGreaterEqualTyped<bool8, bool8>(context); in executeGreaterEqual()
251 bool executeGreater(IOperationExecutionContext* context) { in executeGreater() argument
252 switch (context->getInputType(kInputTensor1)) { in executeGreater()
254 return executeGreaterTyped<_Float16, _Float16>(context); in executeGreater()
256 return executeGreaterTyped<float, float>(context); in executeGreater()
258 return executeGreaterTyped<int32_t, int32_t>(context); in executeGreater()
260 return executeGreaterTyped<uint8_t, float>(context); in executeGreater()
262 return executeGreaterTyped<int8_t, float>(context); in executeGreater()
264 return executeGreaterTyped<bool8, bool8>(context); in executeGreater()