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(
4646
4747} // namespace
4848
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-
5949bool int_array_all_ge (IntArrayRef array, int64_t val) {
6050 for (size_t i = 0 ; i < array.size (); ++i) {
6151 if (array[i] < val) {
Original file line number Diff line number Diff line change @@ -20,7 +20,15 @@ namespace executor {
2020 * the first element will be returned regardless of what i is requested to
2121 * simulate broadcasting.
2222 */
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+ }
2432
2533/* *
2634 * 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