|
23 | 23 | #pragma once |
24 | 24 |
|
25 | 25 |
|
26 | | -#if defined(_OPENMP) && !defined(_WIN32) && (!defined(__GNUC__) || __GNUC__ >= 12) |
| 26 | +#if defined(_OPENMP) && !defined(_WIN32) && !defined(__GNUC__) |
| 27 | + // GCC and CLANG have declarations in standard headers if and only if the architecture and compile options support vectorization, so |
| 28 | + // don't try to override that here - causes dynamic-link errors at startup. |
| 29 | + DT_OMP_DECLARE_SIMD() |
| 30 | + extern float fmaxf(const float x, const float y); |
27 | 31 |
|
28 | | -#ifndef __GNUC__ // GCC 12 compiles but fails at runtime due to missing library function |
29 | | -DT_OMP_DECLARE_SIMD() |
30 | | -extern float fmaxf(const float x, const float y); |
31 | | -#endif |
| 32 | + DT_OMP_DECLARE_SIMD() |
| 33 | + extern float fminf(const float x, const float y); |
32 | 34 |
|
33 | | -#ifndef __GNUC__ // GCC 12 compiles but fails at runtime due to missing library function |
34 | | -DT_OMP_DECLARE_SIMD() |
35 | | -extern float fminf(const float x, const float y); |
36 | | -#endif |
| 35 | + DT_OMP_DECLARE_SIMD() |
| 36 | + extern float fabsf(const float x); |
37 | 37 |
|
38 | | -DT_OMP_DECLARE_SIMD() |
39 | | -extern float fabsf(const float x); |
40 | | - |
41 | | -DT_OMP_DECLARE_SIMD() |
42 | | -extern float powf(const float x, const float y); |
| 38 | + DT_OMP_DECLARE_SIMD() |
| 39 | + extern float powf(const float x, const float y); |
43 | 40 |
|
44 | | -DT_OMP_DECLARE_SIMD() |
45 | | -extern float sqrtf(const float x); |
| 41 | + DT_OMP_DECLARE_SIMD() |
| 42 | + extern float sqrtf(const float x); |
46 | 43 |
|
47 | | -DT_OMP_DECLARE_SIMD() |
48 | | -extern float cbrtf(const float x); |
| 44 | + DT_OMP_DECLARE_SIMD() |
| 45 | + extern float cbrtf(const float x); |
49 | 46 |
|
50 | | -DT_OMP_DECLARE_SIMD() |
51 | | -extern float log2f(const float x); |
| 47 | + DT_OMP_DECLARE_SIMD() |
| 48 | + extern float log2f(const float x); |
52 | 49 |
|
53 | | -DT_OMP_DECLARE_SIMD() |
54 | | -extern float exp2f(const float x); |
| 50 | + DT_OMP_DECLARE_SIMD() |
| 51 | + extern float exp2f(const float x); |
55 | 52 |
|
56 | | -DT_OMP_DECLARE_SIMD() |
57 | | -extern float log10f(const float x); |
| 53 | + DT_OMP_DECLARE_SIMD() |
| 54 | + extern float log10f(const float x); |
58 | 55 |
|
59 | | -DT_OMP_DECLARE_SIMD() |
60 | | -extern float expf(const float x); |
| 56 | + DT_OMP_DECLARE_SIMD() |
| 57 | + extern float expf(const float x); |
61 | 58 |
|
62 | | -DT_OMP_DECLARE_SIMD() |
63 | | -extern float logf(const float x); |
| 59 | + DT_OMP_DECLARE_SIMD() |
| 60 | + extern float logf(const float x); |
64 | 61 |
|
65 | 62 | #endif |
66 | 63 |
|
|
0 commit comments