26 #define get_global_id(a) __guid_arg
27 #define get_local_id(a) ((__guid_arg) % gMiniCLNumOutstandingTasks)
28 #define get_local_size(a) (gMiniCLNumOutstandingTasks)
29 #define get_group_id(a) ((__guid_arg) / gMiniCLNumOutstandingTasks)
34 #define CLK_LOCAL_MEM_FENCE 0x01
35 #define CLK_GLOBAL_MEM_FENCE 0x02
99 return tmp.
x+tmp.
y+tmp.
z;
114 tmp.
x = scalar * b.
x;
115 tmp.
y = scalar * b.
y;
116 tmp.
z = scalar * b.
z;
123 tmp.
x = a.
x * scalar;
124 tmp.
y = a.
y * scalar;
125 tmp.
z = a.
z * scalar;
156 float4(
float v0,
float v1,
float v2,
float v3)
236 tmp.
x = a.
x < 0.f ? 0.f : a.
x;
237 tmp.
y = a.
y < 0.f ? 0.f : a.
y;
238 tmp.
z = a.
z < 0.f ? 0.f : a.
z;
239 tmp.
w = a.
w < 0.f ? 0.f : a.
w;
323 return tmp.
x+tmp.
y+tmp.
z+tmp.
w;
328 float l = sqrtf(a.
x*a.
x+a.
y*a.
y+a.
z*a.
z);
345 tmp.
x = a.
y*b.
z - a.
z*b.
y;
346 tmp.
y = -a.
x*b.
z + a.
z*b.
x;
347 tmp.
z = a.
x*b.
y - a.
y*b.
x;
352 static float max(
float a,
float b)
354 return (a >= b) ? a : b;
358 static float min(
float a,
float b)
360 return (a <= b) ? a : b;
363 static float fmax(
float a,
float b)
365 return (a >= b) ? a : b;
368 static float fmin(
float a,
float b)
370 return (a <= b) ? a : b;
425 #define native_sqrt sqrtf
426 #define native_sin sinf
427 #define native_cos cosf
428 #define native_powr powf
430 #define GUID_ARG ,int __guid_arg
431 #define GUID_ARG_VAL ,__guid_arg
434 #define as_int(a) (*((int*)&(a)))
float4(float3 xyz, float scalarW)
float4 operator*(const float &other)
static float4 operator/(const float4 &b, float a)
float4 & operator+=(const float4 &other)
uint4 & operator+=(const uint4 &other)
float4 operator*(const float4 &other)
float3 & operator-=(const float3 &other)
static float length(const float4 &a)
float4 & operator*=(float scalar)
static float4 normalize(const float4 &a)
float4 & operator-=(const float4 &other)
int gMiniCLNumOutstandingTasks
static float fmin(float a, float b)
static float4 fabs(const float4 &a)
static float max(float a, float b)
static float3 operator*(const float &scalar, const float3 &b)
static float3 operator-(const float3 &a, const float3 &b)
float select(float arg0, float arg1, bool select)
static float4 operator+(const float4 &a, const float4 &b)
static float min(float a, float b)
float4(float v0, float v1, float v2, float v3)
static float dot(const float3 &a, const float3 &b)
static float4 cross(const float4 &a, const float4 &b)
static float fmax(float a, float b)
static void barrier(unsigned int a)
float3 & operator+=(const float3 &other)