master
1/* Macros for math function declarations.
2 Copyright (C) 2024-2025 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#define __SIMD_DECL(function) __CONCAT (__DECL_SIMD_, function)
20
21#define __MATHCALL_VEC(function, suffix, args) \
22 __SIMD_DECL (__MATH_PRECNAME (function, suffix)) \
23 __MATHCALL (function, suffix, args)
24
25#define __MATHDECL_VEC(type, function,suffix, args) \
26 __SIMD_DECL (__MATH_PRECNAME (function, suffix)) \
27 __MATHDECL(type, function,suffix, args)
28
29#define __MATHCALL(function,suffix, args) \
30 __MATHDECL (_Mdouble_,function,suffix, args)
31#define __MATHDECL(type, function,suffix, args) \
32 __MATHDECL_1(type, function,suffix, args); \
33 __MATHDECL_1(type, __CONCAT(__,function),suffix, args)
34#define __MATHCALLX(function,suffix, args, attrib) \
35 __MATHDECLX (_Mdouble_,function,suffix, args, attrib)
36#define __MATHDECLX(type, function,suffix, args, attrib) \
37 __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib)
38#define __MATHDECL_1_IMPL(type, function, suffix, args) \
39 extern type __MATH_PRECNAME(function,suffix) args __THROW
40#define __MATHDECL_1(type, function, suffix, args) \
41 __MATHDECL_1_IMPL(type, function, suffix, args)
42/* Ignore the alias by default. The alias is only useful with
43 redirections. */
44#define __MATHDECL_ALIAS(type, function, suffix, args, alias) \
45 __MATHDECL_1(type, function, suffix, args)
46
47#define __MATHREDIR(type, function, suffix, args, to) \
48 extern type __REDIRECT_NTH (__MATH_PRECNAME (function, suffix), args, to)