[libc-commits] [libc] [libc][mathvec] Initial commit for LIBC vector math component (PR #173058)
Muhammad Bassiouni via libc-commits
libc-commits at lists.llvm.org
Tue Feb 17 13:00:18 PST 2026
================
@@ -0,0 +1,40 @@
+//===-- Common constants for mathvec functions ------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC___SUPPORT_MATHVEC_COMMON_CONSTANTS_H
+#define LLVM_LIBC_SRC___SUPPORT_MATHVEC_COMMON_CONSTANTS_H
+
+namespace LIBC_NAMESPACE_DECL {
+
+namespace mathvec {
+
+// Lookup table for mantissas of 2^(i / 64) with i = 0, ..., 63.
+static constexpr uint64_t EXP_MANTISSA[64] = {
----------------
bassiounix wrote:
Global variables in header files can't be static, only marked as `inline`
```suggestion
LIBC_INLINE_VAR constexpr uint64_t EXP_MANTISSA[64] = {
```
https://github.com/llvm/llvm-project/pull/173058
More information about the libc-commits
mailing list