xref: /llvm-project/libc/src/math/amdgpu/fmax.cpp (revision 5ff3ff33ff930e4ec49da7910612d8a41eb068cb)
1d2926107SJoseph Huber //===-- Implementation of the fmax function for GPU -----------------------===//
2d2926107SJoseph Huber //
3d2926107SJoseph Huber // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4d2926107SJoseph Huber // See https://llvm.org/LICENSE.txt for license information.
5d2926107SJoseph Huber // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6d2926107SJoseph Huber //
7d2926107SJoseph Huber //===----------------------------------------------------------------------===//
8d2926107SJoseph Huber 
9d2926107SJoseph Huber #include "src/math/fmax.h"
1077069453SJoseph Huber 
1177069453SJoseph Huber #include "src/__support/CPP/bit.h"
12d2926107SJoseph Huber #include "src/__support/common.h"
13*5ff3ff33SPetr Hosek #include "src/__support/macros/config.h"
1477069453SJoseph Huber #include "src/__support/macros/optimization.h"
15d2926107SJoseph Huber 
16*5ff3ff33SPetr Hosek namespace LIBC_NAMESPACE_DECL {
17d2926107SJoseph Huber 
18d2926107SJoseph Huber LLVM_LIBC_FUNCTION(double, fmax, (double x, double y)) {
19d2926107SJoseph Huber   return __builtin_fmax(x, y);
20d2926107SJoseph Huber }
21d2926107SJoseph Huber 
22*5ff3ff33SPetr Hosek } // namespace LIBC_NAMESPACE_DECL
23