File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 8
8
9
9
#pragma once
10
10
#include < executorch/runtime/core/error.h>
11
+ #include < executorch/runtime/core/span.h>
11
12
#include < cstddef>
12
13
#include < cstring>
13
14
#include < variant>
@@ -71,6 +72,15 @@ class BackendOptions {
71
72
return Error::NotFound;
72
73
}
73
74
75
+ executorch::runtime::Span<BackendOption> view () const {
76
+ return executorch::runtime::Span<BackendOption>(options_, size_);
77
+ }
78
+
79
+ // Non-const version that allows modification of the underlying data
80
+ executorch::runtime::Span<BackendOption> view () {
81
+ return executorch::runtime::Span<BackendOption>(options_, size_);
82
+ }
83
+
74
84
private:
75
85
BackendOption options_[MaxCapacity]{}; // Storage for backend options
76
86
size_t size_; // Current number of options
You can’t perform that action at this time.
0 commit comments