diff options
| author | Joseph Huber <huberjn@outlook.com> | 2024-02-27 11:39:13 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-27 11:39:13 -0600 |
| commit | d29261074cd18383f4d3c84e740c66de738cb61f (patch) | |
| tree | ba84aba1b36b9fc3f0fac09ee212241c23174d89 /libc/src/math/amdgpu/tgamma.cpp | |
| parent | aa95aa69b96f51a3c19a24a0387ebc1fb7e6e52c (diff) | |
[libc] Clean up GPU math implementations (#83133)
Summary:
The math directory likes to do architecture specific implementations of
these math functions. For the GPU case it was complicated by the fact
that both NVPTX and AMDGPU had to go through the same code paths. Since
reworking the GPU target this is no longer the case and we can simply
use the same scheme. This patch moves all the old code into two separate
directories. This likely results in a net increase in code, but it's
easier to reason with.
Diffstat (limited to 'libc/src/math/amdgpu/tgamma.cpp')
| -rw-r--r-- | libc/src/math/amdgpu/tgamma.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libc/src/math/amdgpu/tgamma.cpp b/libc/src/math/amdgpu/tgamma.cpp new file mode 100644 index 000000000000..10f58d566f88 --- /dev/null +++ b/libc/src/math/amdgpu/tgamma.cpp @@ -0,0 +1,18 @@ +//===-- Implementation of the GPU tgamma 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/tgamma.h" +#include "src/__support/common.h" + +#include "declarations.h" + +namespace LIBC_NAMESPACE { + +LLVM_LIBC_FUNCTION(double, tgamma, (double x)) { return __ocml_tgamma_f64(x); } + +} // namespace LIBC_NAMESPACE |
