|
12 | 12 | #include <executorch/runtime/core/event_tracer.h>
|
13 | 13 | #include <executorch/runtime/core/exec_aten/exec_aten.h>
|
14 | 14 | #include <executorch/runtime/executor/memory_manager.h>
|
| 15 | +#include <executorch/runtime/executor/method_meta.h> |
15 | 16 | #include <executorch/runtime/platform/compiler.h>
|
16 | 17 |
|
17 | 18 | // Forward declare flatbuffer types. This is a public header and must not
|
@@ -196,17 +197,43 @@ class Method final {
|
196 | 197 | */
|
197 | 198 | __ET_NODISCARD Error experimental_reset_execution();
|
198 | 199 |
|
199 |
| - size_t values_size() const; |
200 |
| - const EValue& get_value(size_t i) const; |
201 |
| - EValue& mutable_value(size_t i); |
| 200 | + /** |
| 201 | + * Returns the MethodMeta that corresponds to the calling Method. |
| 202 | + */ |
| 203 | + MethodMeta method_meta() const; |
| 204 | + |
| 205 | + /** |
| 206 | + * Returns the number of inputs the Method expects. |
| 207 | + */ |
202 | 208 | size_t inputs_size() const;
|
203 |
| - size_t get_input_index(size_t i) const; |
204 |
| - const EValue& get_input(size_t i) const; |
205 |
| - EValue& mutable_input(size_t i); |
| 209 | + |
| 210 | + /** |
| 211 | + * Returns the number of outputs the Method returns. |
| 212 | + */ |
206 | 213 | size_t outputs_size() const;
|
207 |
| - size_t get_output_index(size_t i) const; |
| 214 | + |
| 215 | + /** |
| 216 | + * Retrieves the output at the specified index. |
| 217 | + */ |
208 | 218 | const EValue& get_output(size_t i) const;
|
209 |
| - EValue& mutable_output(size_t i); |
| 219 | + |
| 220 | + __ET_DEPRECATED size_t values_size() const; |
| 221 | + __ET_DEPRECATED const EValue& get_value(size_t i) const; |
| 222 | + __ET_DEPRECATED EValue& mutable_value(size_t i); |
| 223 | + /// DEPRECATED: Use MethodMeta instead to access metadata, and set_input to |
| 224 | + /// update Method inputs. |
| 225 | + __ET_DEPRECATED size_t get_input_index(size_t i) const; |
| 226 | + /// DEPRECATED: Use MethodMeta instead to access metadata, and set_input to |
| 227 | + /// update Method inputs. |
| 228 | + __ET_DEPRECATED const EValue& get_input(size_t i) const; |
| 229 | + /// DEPRECATED: Use MethodMeta instead to access metadata, and set_input to |
| 230 | + /// update Method inputs. |
| 231 | + __ET_DEPRECATED EValue& mutable_input(size_t i); |
| 232 | + __ET_DEPRECATED size_t get_output_index(size_t i) const; |
| 233 | + /// DEPRECATED: Use MethodMeta instead to access metadata, and get_output to |
| 234 | + /// retrieve Method outputs. |
| 235 | + __ET_DEPRECATED EValue& mutable_output(size_t i); |
| 236 | + |
210 | 237 | ~Method();
|
211 | 238 |
|
212 | 239 | private:
|
|
0 commit comments