xref: /llvm-project/libc/src/math/generic/llrintf16.cpp (revision 5ff3ff33ff930e4ec49da7910612d8a41eb068cb)
12635d041SOverMighty //===-- Implementation of llrintf16 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/llrintf16.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 long, llrintf16, (float16 x)) {
172635d041SOverMighty   return fputil::round_to_signed_integer_using_current_rounding_mode<float16,
182635d041SOverMighty                                                                      long long>(
192635d041SOverMighty       x);
202635d041SOverMighty }
212635d041SOverMighty 
22*5ff3ff33SPetr Hosek } // namespace LIBC_NAMESPACE_DECL
23