forked from OSchip/llvm-project
[VENTUS][RISCV][fix] Fix undefined symbol errors in libclc
We expand all the macros used in these changed files hand by hand, a little stupid, but it works
This commit is contained in:
parent
7da8486eb3
commit
9899aee134
|
@ -1,5 +1,29 @@
|
|||
#include <clc/clc.h>
|
||||
|
||||
#define __CLC_BODY <native_exp.inc>
|
||||
#define __FLOAT_ONLY
|
||||
#include <clc/math/gentype.inc>
|
||||
// #define __CLC_BODY <native_exp.inc>
|
||||
// #define __FLOAT_ONLY
|
||||
// #include <clc/math/gentype.inc>
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float native_exp(float val) {
|
||||
return exp(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float2 native_exp(float2 val) {
|
||||
return exp(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float3 native_exp(float3 val) {
|
||||
return exp(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float4 native_exp(float4 val) {
|
||||
return exp(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float8 native_exp(float8 val) {
|
||||
return exp(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float16 native_exp(float16 val) {
|
||||
return exp(val);
|
||||
}
|
||||
|
|
|
@ -43,5 +43,5 @@ _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE modf(__CLC_GENTYPE x, __CLC_GENTYPE *iptr)
|
|||
|
||||
MODF_DEF(local);
|
||||
MODF_DEF(global);
|
||||
|
||||
MODF_DEF(private);
|
||||
#undef ZERO
|
||||
|
|
|
@ -1,7 +1,30 @@
|
|||
#include <clc/clc.h>
|
||||
|
||||
#define __CLC_NATIVE_INTRINSIC cos
|
||||
// #define __CLC_BODY <native_unary_intrinsic.inc>
|
||||
// #define __FLOAT_ONLY
|
||||
// #include <clc/math/gentype.inc>
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float native_cos(float val) {
|
||||
return cos(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float2 native_cos(float2 val) {
|
||||
return cos(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float3 native_cos(float3 val) {
|
||||
return cos(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float4 native_cos(float4 val) {
|
||||
return cos(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float8 native_cos(float8 val) {
|
||||
return cos(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float16 native_cos(float16 val) {
|
||||
return cos(val);
|
||||
}
|
||||
|
||||
#define __CLC_BODY <native_unary_intrinsic.inc>
|
||||
#define __FLOAT_ONLY
|
||||
#include <clc/math/gentype.inc>
|
||||
|
|
|
@ -1,7 +1,31 @@
|
|||
#include <clc/clc.h>
|
||||
|
||||
#define __CLC_NATIVE_INTRINSIC exp
|
||||
// #define __CLC_NATIVE_INTRINSIC exp
|
||||
|
||||
#define __CLC_BODY <native_unary_intrinsic.inc>
|
||||
#define __FLOAT_ONLY
|
||||
#include <clc/math/gentype.inc>
|
||||
// #define __CLC_BODY <native_unary_intrinsic.inc>
|
||||
// #define __FLOAT_ONLY
|
||||
// #include <clc/math/gentype.inc>
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float native_exp(float val) {
|
||||
return exp(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float2 native_exp(float2 val) {
|
||||
return exp(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float3 native_exp(float3 val) {
|
||||
return exp(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float4 native_exp(float4 val) {
|
||||
return exp(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float8 native_exp(float8 val) {
|
||||
return exp(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float16 native_exp(float16 val) {
|
||||
return exp(val);
|
||||
}
|
|
@ -1,7 +1,31 @@
|
|||
#include <clc/clc.h>
|
||||
|
||||
#define __CLC_NATIVE_INTRINSIC exp2
|
||||
// #define __CLC_NATIVE_INTRINSIC exp2
|
||||
|
||||
#define __CLC_BODY <native_unary_intrinsic.inc>
|
||||
#define __FLOAT_ONLY
|
||||
#include <clc/math/gentype.inc>
|
||||
// #define __CLC_BODY <native_unary_intrinsic.inc>
|
||||
// #define __FLOAT_ONLY
|
||||
// #include <clc/math/gentype.inc>
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float native_exp2(float val) {
|
||||
return exp2(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float2 native_exp2(float2 val) {
|
||||
return exp2(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float3 native_exp2(float3 val) {
|
||||
return exp2(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float4 native_exp2(float4 val) {
|
||||
return exp2(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float8 native_exp2(float8 val) {
|
||||
return exp2(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float16 native_exp2(float16 val) {
|
||||
return exp2(val);
|
||||
}
|
||||
|
|
|
@ -22,8 +22,30 @@
|
|||
|
||||
#include <clc/clc.h>
|
||||
|
||||
#define __CLC_NATIVE_INTRINSIC log
|
||||
// #define __CLC_BODY <native_unary_intrinsic.inc>
|
||||
// #define __FLOAT_ONLY
|
||||
// #include <clc/math/gentype.inc>
|
||||
|
||||
#define __CLC_BODY <native_unary_intrinsic.inc>
|
||||
#define __FLOAT_ONLY
|
||||
#include <clc/math/gentype.inc>
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float native_log(float val) {
|
||||
return log(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float2 native_log(float2 val) {
|
||||
return log(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float3 native_log(float3 val) {
|
||||
return log(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float4 native_log(float4 val) {
|
||||
return log(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float8 native_log(float8 val) {
|
||||
return log(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float16 native_log(float16 val) {
|
||||
return log(val);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,31 @@
|
|||
#include <clc/clc.h>
|
||||
|
||||
#define __CLC_NATIVE_INTRINSIC log10
|
||||
// #define __CLC_NATIVE_INTRINSIC log10
|
||||
|
||||
#define __CLC_BODY <native_unary_intrinsic.inc>
|
||||
#define __FLOAT_ONLY
|
||||
#include <clc/math/gentype.inc>
|
||||
// #define __CLC_BODY <native_unary_intrinsic.inc>
|
||||
// #define __FLOAT_ONLY
|
||||
// #include <clc/math/gentype.inc>
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float native_log10(float val) {
|
||||
return log10(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float2 native_log10(float2 val) {
|
||||
return log10(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float3 native_log10(float3 val) {
|
||||
return log10(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float4 native_log10(float4 val) {
|
||||
return log10(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float8 native_log10(float8 val) {
|
||||
return log10(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float16 native_log10(float16 val) {
|
||||
return log10(val);
|
||||
}
|
||||
|
|
|
@ -22,7 +22,31 @@
|
|||
|
||||
#include <clc/clc.h>
|
||||
|
||||
#define __CLC_NATIVE_INTRINSIC log2
|
||||
#define __CLC_BODY <native_unary_intrinsic.inc>
|
||||
#define __FLOAT_ONLY
|
||||
#include <clc/math/gentype.inc>
|
||||
// #define __CLC_NATIVE_INTRINSIC log2
|
||||
// #define __CLC_BODY <native_unary_intrinsic.inc>
|
||||
// #define __FLOAT_ONLY
|
||||
// #include <clc/math/gentype.inc>
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float native_log2(float val) {
|
||||
return log2(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float2 native_log2(float2 val) {
|
||||
return log2(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float3 native_log2(float3 val) {
|
||||
return log2(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float4 native_log2(float4 val) {
|
||||
return log2(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float8 native_log2(float8 val) {
|
||||
return log2(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float16 native_log2(float16 val) {
|
||||
return log2(val);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,31 @@
|
|||
#include <clc/clc.h>
|
||||
|
||||
#define __CLC_NATIVE_INTRINSIC sin
|
||||
// #define __CLC_NATIVE_INTRINSIC sin
|
||||
|
||||
#define __CLC_BODY <native_unary_intrinsic.inc>
|
||||
#define __FLOAT_ONLY
|
||||
#include <clc/math/gentype.inc>
|
||||
// #define __CLC_BODY <native_unary_intrinsic.inc>
|
||||
// #define __FLOAT_ONLY
|
||||
// #include <clc/math/gentype.inc>
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float native_sin(float val) {
|
||||
return sin(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float2 native_sin(float2 val) {
|
||||
return sin(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float3 native_sin(float3 val) {
|
||||
return sin(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float4 native_sin(float4 val) {
|
||||
return sin(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float8 native_sin(float8 val) {
|
||||
return sin(val);
|
||||
}
|
||||
|
||||
__attribute__((overloadable)) __attribute__((always_inline)) float16 native_sin(float16 val) {
|
||||
return sin(val);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue