/* * Copyright (c) Meta Platforms, Inc. and affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #include namespace executorch { namespace runtime { template <> exec_aten::ArrayRef> BoxedEvalueList>::get() const { for (typename exec_aten::ArrayRef< exec_aten::optional>::size_type i = 0; i < wrapped_vals_.size(); i++) { if (wrapped_vals_[i] == nullptr) { unwrapped_vals_[i] = exec_aten::nullopt; } else { unwrapped_vals_[i] = wrapped_vals_[i]->to>(); } } return exec_aten::ArrayRef>{ unwrapped_vals_, wrapped_vals_.size()}; } } // namespace runtime } // namespace executorch