12635d041SOverMighty //===-- Implementation of lroundf16 function ------------------------------===// 22635d041SOverMighty // 32635d041SOverMighty // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 42635d041SOverMighty // See https://llvm.org/LICENSE.txt for license information. 52635d041SOverMighty // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 62635d041SOverMighty // 72635d041SOverMighty //===----------------------------------------------------------------------===// 82635d041SOverMighty 92635d041SOverMighty #include "src/math/lroundf16.h" 102635d041SOverMighty #include "src/__support/FPUtil/NearestIntegerOperations.h" 112635d041SOverMighty #include "src/__support/common.h" 12*5ff3ff33SPetr Hosek #include "src/__support/macros/config.h" 132635d041SOverMighty 14*5ff3ff33SPetr Hosek namespace LIBC_NAMESPACE_DECL { 152635d041SOverMighty 162635d041SOverMighty LLVM_LIBC_FUNCTION(long, lroundf16, (float16 x)) { 172635d041SOverMighty return fputil::round_to_signed_integer<float16, long>(x); 182635d041SOverMighty } 192635d041SOverMighty 20*5ff3ff33SPetr Hosek } // namespace LIBC_NAMESPACE_DECL 21