[libc-commits] [libc] [libc] Clean up GPU math implementations (PR #83133)

Matt Arsenault via libc-commits libc-commits at lists.llvm.org
Tue Feb 27 07:53:43 PST 2024


================
@@ -0,0 +1,16 @@
+//===-- Implementation of the GPU trunc 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/trunc.h"
+#include "src/__support/common.h"
+
+namespace LIBC_NAMESPACE {
+
+LLVM_LIBC_FUNCTION(double, trunc, (double x)) { return __builtin_trunc(x); }
----------------
arsenm wrote:

Why aren't the simple cases like this in a common place still? 

https://github.com/llvm/llvm-project/pull/83133


More information about the libc-commits mailing list