File tree Expand file tree Collapse file tree 2 files changed +9
-11
lines changed
kernels/portable/cpu/util Expand file tree Collapse file tree 2 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -46,16 +46,6 @@ bool param_array_is_valid(
46
46
47
47
} // namespace
48
48
49
- int64_t val_at (IntArrayRef array, size_t i, int64_t default_value) {
50
- if (array.size () == 1 ) {
51
- return array[0 ];
52
- } else if (array.size () > 1 ) {
53
- return array[i];
54
- } else {
55
- return default_value;
56
- }
57
- }
58
-
59
49
bool int_array_all_ge (IntArrayRef array, int64_t val) {
60
50
for (size_t i = 0 ; i < array.size (); ++i) {
61
51
if (array[i] < val) {
Original file line number Diff line number Diff line change @@ -20,7 +20,15 @@ namespace executor {
20
20
* the first element will be returned regardless of what i is requested to
21
21
* simulate broadcasting.
22
22
*/
23
- int64_t val_at (IntArrayRef array, size_t i, int64_t default_value = 1 );
23
+ inline int64_t val_at (IntArrayRef array, size_t i, int64_t default_value = 1 ) {
24
+ if (array.size () == 1 ) {
25
+ return array[0 ];
26
+ } else if (array.size () > 1 ) {
27
+ return array[i];
28
+ } else {
29
+ return default_value;
30
+ }
31
+ }
24
32
25
33
/* *
26
34
* Checks that all elements of an IntArray are greater than or equal to `val`.
You can’t perform that action at this time.
0 commit comments