The current generic implementation of the fmaf function has been moved to the FPUtil directory. This allows one use the fma operation from implementations of other math functions like the trignometric functions without depending on/requiring the fma/fmaf/fmal function targets. If this pattern ends being convenient, we will switch all generic math implementations to this pattern. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D100811
21 lines
614 B
C++
21 lines
614 B
C++
//===-- Implementation of fma function ------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "src/math/fma.h"
|
|
#include "src/__support/common.h"
|
|
|
|
#include "utils/FPUtil/FMA.h"
|
|
|
|
namespace __llvm_libc {
|
|
|
|
LLVM_LIBC_FUNCTION(double, fma, (double x, double y, double z)) {
|
|
return fputil::fma(x, y, z);
|
|
}
|
|
|
|
} // namespace __llvm_libc
|