Lines Matching refs:context
77 bool prepare(IOperationExecutionContext* context) { in prepare() argument
78 const Shape& inputShape = context->getInputShape(kInputTensor); in prepare()
82 const Shape& beginShape = context->getInputShape(kBeginTensor); in prepare()
86 const Shape& sizeShape = context->getInputShape(kSizeTensor); in prepare()
90 const int32_t* beginData = context->getInputBuffer<int32_t>(kBeginTensor); in prepare()
91 const int32_t* sizeData = context->getInputBuffer<int32_t>(kSizeTensor); in prepare()
93 Shape outputShape = context->getOutputShape(kOutputTensor); in prepare()
107 return context->setOutputShape(kOutputTensor, outputShape); in prepare()
110 bool execute(IOperationExecutionContext* context) { in execute() argument
112 if (getNumberOfElements(context->getOutputShape(kOutputTensor)) == 0) return true; in execute()
113 switch (context->getInputType(kInputTensor)) { in execute()
115 return evalGeneric(context->getInputBuffer<_Float16>(kInputTensor), in execute()
116 context->getInputShape(kInputTensor), in execute()
117 context->getInputBuffer<int32_t>(kBeginTensor), in execute()
118 context->getInputShape(kBeginTensor), in execute()
119 context->getInputBuffer<int32_t>(kSizeTensor), in execute()
120 context->getInputShape(kSizeTensor), in execute()
121 context->getOutputBuffer<_Float16>(kOutputTensor), in execute()
122 context->getOutputShape(kOutputTensor)); in execute()
124 return evalGeneric(context->getInputBuffer<float>(kInputTensor), in execute()
125 context->getInputShape(kInputTensor), in execute()
126 context->getInputBuffer<int32_t>(kBeginTensor), in execute()
127 context->getInputShape(kBeginTensor), in execute()
128 context->getInputBuffer<int32_t>(kSizeTensor), in execute()
129 context->getInputShape(kSizeTensor), in execute()
130 context->getOutputBuffer<float>(kOutputTensor), in execute()
131 context->getOutputShape(kOutputTensor)); in execute()
133 return evalGeneric(context->getInputBuffer<int32_t>(kInputTensor), in execute()
134 context->getInputShape(kInputTensor), in execute()
135 context->getInputBuffer<int32_t>(kBeginTensor), in execute()
136 context->getInputShape(kBeginTensor), in execute()
137 context->getInputBuffer<int32_t>(kSizeTensor), in execute()
138 context->getInputShape(kSizeTensor), in execute()
139 context->getOutputBuffer<int32_t>(kOutputTensor), in execute()
140 context->getOutputShape(kOutputTensor)); in execute()
142 return evalGeneric(context->getInputBuffer<uint8_t>(kInputTensor), in execute()
143 context->getInputShape(kInputTensor), in execute()
144 context->getInputBuffer<int32_t>(kBeginTensor), in execute()
145 context->getInputShape(kBeginTensor), in execute()
146 context->getInputBuffer<int32_t>(kSizeTensor), in execute()
147 context->getInputShape(kSizeTensor), in execute()
148 context->getOutputBuffer<uint8_t>(kOutputTensor), in execute()
149 context->getOutputShape(kOutputTensor)); in execute()
151 return evalGeneric(context->getInputBuffer<int8_t>(kInputTensor), in execute()
152 context->getInputShape(kInputTensor), in execute()
153 context->getInputBuffer<int32_t>(kBeginTensor), in execute()
154 context->getInputShape(kBeginTensor), in execute()
155 context->getInputBuffer<int32_t>(kSizeTensor), in execute()
156 context->getInputShape(kSizeTensor), in execute()
157 context->getOutputBuffer<int8_t>(kOutputTensor), in execute()
158 context->getOutputShape(kOutputTensor)); in execute()