Lines Matching refs:context

63 bool validate(const IOperationValidationContext* context) {  in validate()  argument
64 NN_RET_CHECK_EQ(context->getNumInputs(), kNumInputs); in validate()
65 NN_RET_CHECK_EQ(context->getNumOutputs(), kNumOutputs); in validate()
66 OperandType inputType = context->getInputType(kInputTensor1); in validate()
69 NN_RET_CHECK(validateInputTypes(context, {inputType, inputType})); in validate()
70 NN_RET_CHECK(validateOutputTypes(context, {inputType})); in validate()
71 return validateHalVersion(context, HalVersion::V1_2); in validate()
74 bool prepare(IOperationExecutionContext* context) { in prepare() argument
75 Shape input1 = context->getInputShape(kInputTensor1); in prepare()
76 Shape input2 = context->getInputShape(kInputTensor2); in prepare()
77 Shape output = context->getOutputShape(kOutputTensor); in prepare()
79 return context->setOutputShape(kOutputTensor, output); in prepare()
82 bool executeAnd(IOperationExecutionContext* context) { in executeAnd() argument
84 std::logical_and<bool>(), context->getInputBuffer<bool8>(kInputTensor1), in executeAnd()
85 context->getInputShape(kInputTensor1), context->getInputBuffer<bool8>(kInputTensor2), in executeAnd()
86 context->getInputShape(kInputTensor2), context->getOutputBuffer<bool8>(kOutputTensor), in executeAnd()
87 context->getOutputShape(kOutputTensor)); in executeAnd()
90 bool executeOr(IOperationExecutionContext* context) { in executeOr() argument
92 std::logical_or<bool>(), context->getInputBuffer<bool8>(kInputTensor1), in executeOr()
93 context->getInputShape(kInputTensor1), context->getInputBuffer<bool8>(kInputTensor2), in executeOr()
94 context->getInputShape(kInputTensor2), context->getOutputBuffer<bool8>(kOutputTensor), in executeOr()
95 context->getOutputShape(kOutputTensor)); in executeOr()