Lines Matching refs:context

58 bool validate(const IOperationValidationContext* context) {  in validate()  argument
59 NN_RET_CHECK_EQ(context->getNumInputs(), kNumInputs); in validate()
60 NN_RET_CHECK_EQ(context->getNumOutputs(), kNumOutputs); in validate()
61 auto inputType = context->getInputType(kInputTensor); in validate()
63 NN_RET_CHECK(validateHalVersion(context, HalVersion::V1_3)); in validate()
69 return validateInputTypes(context, {inputType, scalarType}) && in validate()
70 validateOutputTypes(context, {inputType}); in validate()
73 bool prepare(IOperationExecutionContext* context) { in prepare() argument
74 Shape inputShape = context->getInputShape(kInputTensor); in prepare()
75 return context->setOutputShape(kOutputTensor, inputShape); in prepare()
78 bool execute(IOperationExecutionContext* context) { in execute() argument
80 if (getNumberOfElements(context->getOutputShape(kOutputTensor)) == 0) return true; in execute()
81 switch (context->getInputType(kInputTensor)) { in execute()
83 return eluFloat(context->getInputBuffer<_Float16>(kInputTensor), in execute()
84 context->getInputShape(kInputTensor), in execute()
85 context->getInputValue<_Float16>(kAlphaScalar), in execute()
86 context->getOutputBuffer<_Float16>(kOutputTensor), in execute()
87 context->getOutputShape(kOutputTensor)); in execute()
89 return eluFloat(context->getInputBuffer<float>(kInputTensor), in execute()
90 context->getInputShape(kInputTensor), in execute()
91 context->getInputValue<float>(kAlphaScalar), in execute()
92 context->getOutputBuffer<float>(kOutputTensor), in execute()
93 context->getOutputShape(kOutputTensor)); in execute()