[clang] [OFFLOAD] Introduce OpenMP math wrappers for SPIRV backend (PR #192139)

Nick Sarnie via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 16 10:24:54 PDT 2026


================
@@ -0,0 +1,719 @@
+/*===---- __clang_spirv_math.h - Device-side HIP math support --------------===
+ *
+ * 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 __CLANG_SPIRV_MATH_H__
+#define __CLANG_SPIRV_MATH_H__
+
+#if !defined(__SPIRV__) && !defined(__OPENMP_SPIRV__)
+#error "This file is for SPIRV and OpenMP AMDGCN device compilation only."
----------------
sarnex wrote:

probably this message needs to be reworded

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


More information about the cfe-commits mailing list