ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
_
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Variables
_
a
c
d
e
f
h
m
n
p
r
s
t
w
x
Typedefs
Enumerations
Enumerator
_
a
e
f
i
l
n
r
s
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Typedefs
_
a
c
d
i
m
o
p
r
s
t
u
v
w
Enumerations
Enumerator
a
b
c
e
i
l
m
n
o
p
r
t
u
v
w
Related Symbols
c
e
h
i
l
p
r
s
t
v
x
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
Typedefs
_
a
b
c
d
e
f
i
k
m
o
p
r
s
u
v
w
x
Enumerations
_
a
c
k
l
m
n
o
x
Enumerator
_
a
c
e
f
k
l
m
n
o
s
t
x
Macros
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
include
jit
clang_stdlib
openmp_wrappers
math.h
Go to the documentation of this file.
1
/*===---- openmp_wrapper/math.h -------- OpenMP math.h intercept ------ c++ -===
2
*
3
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
* See https://llvm.org/LICENSE.txt for license information.
5
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
*
7
*===-----------------------------------------------------------------------===
8
*/
9
10
// If we are in C++ mode and include <math.h> (not <cmath>) first, we still need
11
// to make sure <cmath> is read first. The problem otherwise is that we haven't
12
// seen the declarations of the math.h functions when the system math.h includes
13
// our cmath overlay. However, our cmath overlay, or better the underlying
14
// overlay, e.g. CUDA, uses the math.h functions. Since we haven't declared them
15
// yet we get errors. CUDA avoids this by eagerly declaring all math functions
16
// (in the __device__ space) but we cannot do this. Instead we break the
17
// dependence by forcing cmath to go first. While our cmath will in turn include
18
// this file, the cmath guards will prevent recursion.
19
#ifdef __cplusplus
20
#include <cmath>
21
#endif
22
23
#ifndef __CLANG_OPENMP_MATH_H__
24
#define __CLANG_OPENMP_MATH_H__
25
26
#ifndef _OPENMP
27
#error "This file is for OpenMP compilation only."
28
#endif
29
30
#include_next <math.h>
31
32
// We need limits.h for __clang_cuda_math.h below and because it should not hurt
33
// we include it eagerly here.
34
#include <
limits.h
>
35
36
// We need stdlib.h because (for now) __clang_cuda_math.h below declares `abs`
37
// which should live in stdlib.h.
38
#include <stdlib.h>
39
40
#pragma omp begin declare variant match( \
41
device = {arch(nvptx, nvptx64)}, implementation = {extension(match_any)})
42
43
#define __CUDA__
44
#define __OPENMP_NVPTX__
45
#include <
__clang_cuda_math.h
>
46
#undef __OPENMP_NVPTX__
47
#undef __CUDA__
48
49
#pragma omp end declare variant
50
51
#endif
__clang_cuda_math.h
limits.h
Generated on Mon Feb 17 2025 13:12:28 for ETISS 0.8.0 by
1.9.8