Go to the source code of this file.
Functions | |
typedef | __attribute__ ((ext_vector_type(4))) |
float4 | lit (float4 tmp) |
float4 | cmp (float4 tmp0, float4 tmp1, float4 tmp2) |
float | cosf (float val) |
float | sinf (float val) |
float4 | vcos (float4 val) |
float4 | scs (float4 val) |
float4 | vsin (float4 val) |
int | kil (float4 val) |
typedef __attribute__ | ( | (ext_vector_type(4)) | ) |
Definition at line 32 of file llvm_builtins.c.
References powf().
00037 { 00038 if (b < -128.0f) b = -128.0f; 00039 if (b > 128.0f) b = 128.0f; 00040 if (a < 0) a = 0; 00041 return powf(a, b); 00042 }
Definition at line 59 of file llvm_builtins.c.
00060 { 00061 float4 result; 00062 00063 result.x = (tmp0.x < 0.0) ? tmp1.x : tmp2.x; 00064 result.y = (tmp0.y < 0.0) ? tmp1.y : tmp2.y; 00065 result.z = (tmp0.z < 0.0) ? tmp1.z : tmp2.z; 00066 result.w = (tmp0.w < 0.0) ? tmp1.w : tmp2.w; 00067 00068 return result; 00069 }
float cosf | ( | float | val | ) |
int kil | ( | float4 | val | ) |
Definition at line 108 of file llvm_builtins.c.
00109 { 00110 if (val.x < 0 || val.y < 0 || val.z < 0 || val.w < 0) 00111 return 1; 00112 else 00113 return 0; 00114 }
Definition at line 44 of file llvm_builtins.c.
00045 { 00046 float4 result; 00047 result.x = 1.0; 00048 result.w = 1.0; 00049 if (tmp.x > 0) { 00050 result.y = tmp.x; 00051 result.z = approx(tmp.y, tmp.w); 00052 } else { 00053 result.y = 0; 00054 result.z = 0; 00055 } 00056 return result; 00057 }
float sinf | ( | float | val | ) |
Definition at line 74 of file llvm_builtins.c.
References cosf().
00075 { 00076 float4 result; 00077 printf("VEC IN is %f %f %f %f\n", val.x, val.y, val.z, val.w); 00078 result.x = cosf(val.x); 00079 result.y = cosf(val.x); 00080 result.z = cosf(val.x); 00081 result.w = cosf(val.x); 00082 printf("VEC OUT is %f %f %f %f\n", result.x, result.y, result.z, result.w); 00083 return result; 00084 }
Definition at line 96 of file llvm_builtins.c.
References sinf().
00097 { 00098 float4 result; 00099 float tmp = val.x; 00100 float res = sinf(tmp); 00101 result.x = res; 00102 result.y = res; 00103 result.z = res; 00104 result.w = res; 00105 return result; 00106 }