Lines Matching refs:context
73 bool execute(IOperationExecutionContext* context, float func(float)) { in execute() argument
74 switch (context->getInputType(kInputTensor)) { in execute()
76 return compute<float, _Float16>(func, context->getInputBuffer<_Float16>(kInputTensor), in execute()
77 context->getInputShape(kInputTensor), in execute()
78 context->getOutputBuffer<_Float16>(kOutputTensor)); in execute()
80 return compute<float, float>(func, context->getInputBuffer<float>(kInputTensor), in execute()
81 context->getInputShape(kInputTensor), in execute()
82 context->getOutputBuffer<float>(kOutputTensor)); in execute()
90 bool executeAbs(IOperationExecutionContext* context) { in executeAbs() argument
91 switch (context->getInputType(kInputTensor)) { in executeAbs()
94 context->getInputBuffer<_Float16>(kInputTensor), in executeAbs()
95 context->getInputShape(kInputTensor), in executeAbs()
96 context->getOutputBuffer<_Float16>(kOutputTensor)); in executeAbs()
98 return compute<float, float>(std::abs, context->getInputBuffer<float>(kInputTensor), in executeAbs()
99 context->getInputShape(kInputTensor), in executeAbs()
100 context->getOutputBuffer<float>(kOutputTensor)); in executeAbs()
103 context->getInputBuffer<int32_t>(kInputTensor), in executeAbs()
104 context->getInputShape(kInputTensor), in executeAbs()
105 context->getOutputBuffer<int32_t>(kOutputTensor)); in executeAbs()
111 bool executeRsqrt(IOperationExecutionContext* context) { in executeRsqrt() argument
113 const auto tensorType = context->getInputType(kInputTensor); in executeRsqrt()
116 return compute<float, _Float16>(frsqrt, context->getInputBuffer<_Float16>(kInputTensor), in executeRsqrt()
117 context->getInputShape(kInputTensor), in executeRsqrt()
118 context->getOutputBuffer<_Float16>(kOutputTensor)); in executeRsqrt()
120 return compute<float, float>(frsqrt, context->getInputBuffer<float>(kInputTensor), in executeRsqrt()
121 context->getInputShape(kInputTensor), in executeRsqrt()
122 context->getOutputBuffer<float>(kOutputTensor)); in executeRsqrt()
124 const Shape inShape = context->getInputShape(kInputTensor); in executeRsqrt()
125 const Shape outShape = context->getOutputShape(kOutputTensor); in executeRsqrt()
129 context->getInputBuffer<uint8_t>(kInputTensor), in executeRsqrt()
130 context->getInputShape(kInputTensor), in executeRsqrt()
131 context->getOutputBuffer<uint8_t>(kOutputTensor)); in executeRsqrt()
134 const Shape inShape = context->getInputShape(kInputTensor); in executeRsqrt()
135 const Shape outShape = context->getOutputShape(kOutputTensor); in executeRsqrt()
139 context->getInputBuffer<int8_t>(kInputTensor), in executeRsqrt()
140 context->getInputShape(kInputTensor), in executeRsqrt()
141 context->getOutputBuffer<int8_t>(kOutputTensor)); in executeRsqrt()
149 bool prepare(IOperationExecutionContext* context) { in prepare() argument
150 Shape input = context->getInputShape(kInputTensor); in prepare()
151 Shape output = context->getOutputShape(kOutputTensor); in prepare()
153 return context->setOutputShape(kOutputTensor, output); in prepare()
156 bool prepareFloor(IOperationExecutionContext* context) { in prepareFloor() argument
157 Shape input = context->getInputShape(kInputTensor); in prepareFloor()
158 Shape output = context->getOutputShape(kOutputTensor); in prepareFloor()
161 return context->setOutputShape(kOutputTensor, output); in prepareFloor()
164 bool executeExp(IOperationExecutionContext* context) { in executeExp() argument
165 return execute(context, std::exp); in executeExp()
168 bool executeFloor(IOperationExecutionContext* context) { in executeFloor() argument
169 return execute(context, std::floor); in executeFloor()
172 bool executeLog(IOperationExecutionContext* context) { in executeLog() argument
173 return execute(context, std::log); in executeLog()
176 bool executeSin(IOperationExecutionContext* context) { in executeSin() argument
177 return execute(context, std::sin); in executeSin()
180 bool executeSqrt(IOperationExecutionContext* context) { in executeSqrt() argument
181 return execute(context, std::sqrt); in executeSqrt()