Lines Matching refs:context

61 bool executeTyped(IOperationExecutionContext* context) {  in executeTyped()  argument
63 context->getInputBuffer<bool8>(kInputCondition), in executeTyped()
64 context->getInputShape(kInputCondition), context->getInputBuffer<T>(kInputTensor1), in executeTyped()
65 context->getInputShape(kInputTensor1), context->getInputBuffer<T>(kInputTensor2), in executeTyped()
66 context->getInputShape(kInputTensor2), context->getOutputBuffer<T>(kOutputTensor), in executeTyped()
67 context->getOutputShape(kOutputTensor)); in executeTyped()
72 bool validate(const IOperationValidationContext* context) { in validate() argument
73 NN_RET_CHECK_EQ(context->getNumInputs(), kNumInputs); in validate()
74 NN_RET_CHECK_EQ(context->getNumOutputs(), kNumOutputs); in validate()
75 OperandType inputType = context->getInputType(kInputTensor1); in validate()
82 NN_RET_CHECK(validateInputTypes(context, {OperandType::TENSOR_BOOL8, inputType, inputType})); in validate()
83 NN_RET_CHECK(validateOutputTypes(context, {inputType})); in validate()
84 return validateHalVersion(context, HalVersion::V1_2); in validate()
87 bool prepare(IOperationExecutionContext* context) { in prepare() argument
88 Shape inputCondition = context->getInputShape(kInputCondition); in prepare()
89 Shape input1 = context->getInputShape(kInputTensor1); in prepare()
101 Shape input2 = context->getInputShape(kInputTensor2); in prepare()
104 Shape output = context->getOutputShape(kOutputTensor); in prepare()
106 return context->setOutputShape(kOutputTensor, output); in prepare()
109 bool execute(IOperationExecutionContext* context) { in execute() argument
110 switch (context->getInputType(kInputTensor1)) { in execute()
112 return executeTyped<_Float16>(context); in execute()
114 return executeTyped<float>(context); in execute()
116 return executeTyped<int32_t>(context); in execute()
118 return executeTyped<uint8_t>(context); in execute()
120 return executeTyped<int8_t>(context); in execute()