kernel_code
stringlengths
49
1.22M
kernel void test_block_3_3_kern(global int* a0, global int* a1, global int* a2, global int* b0, global int* b1, global int* b2, local int* c0, local int* c1, local int* c2) { int i; unsigned int gtid = get_global_id(0); unsigned int ltid = get_local_id(0); size_t lsz = get_local_size(0); c0[ltid] = a0[gtid] +...
kernel void DFT(global double* data, global double* scratch, const int size, unsigned int dir) { int idX = get_global_id(0); double2 TEMP = (double2)(0, 0); double2 W; int i; for (i = 0; i < size; i++) { W = (double2)(cos(6.283185307179586476925286766559 * idX * i / size), -sin(6.283185307179586476925286...
kernel void superKernel(global int* seconds_input, global char* debugger, global int* numberjobs, global int* output) { float AddPerUs = 14846398.5; float adds = (*seconds_input) * AddPerUs; int t = get_global_id(0); int t2 = get_local_id(0); output[t] = t2; int loop = *numberjobs; int loop_temp; for (...
kernel void initCellsOld(global int* cells, global int* particles_list, const unsigned int numCells, const unsigned int numParticles) { const unsigned int i = get_global_id(0); if (i < numCells) { cells[i] = -1; } if (i < numParticles) { particles_list[i] = -1; } }
kernel void pown_fw_kernel(const global float* px, const int k, const unsigned size, global float* py) { const unsigned i = get_global_id(0); if (i < size) py[i] = pown(px[i], k); }
kernel void half_exp10_float(global float* src_0, global float* dst) { int gid = get_global_id(0); dst[gid] = half_exp10(src_0[gid]); }
constant int data[4] = {7, 42, 0, -1}; kernel void program_scope_constant_array(global int* output) { int i = get_global_id(0); output[i] = data[i]; }
kernel void MatrixMultiplication(global float const* restrict A, global float const* restrict B, global float* restrict C) { for (int n = 0; n < 32; ++n) { for (int m = 0; m < 32; ++m) { float acc = 0; for (int k = 0; k < 32; ++k) { acc += A[n * 32 + k] * B[k * 32 + m]; } C[n * 32 ...
kernel void vload_bench_10000float4(global float* src, global unsigned int* dst, unsigned int offset) { int id = (int)get_global_id(0); uint4 srcV = 0; for (int i = 0; i < 10000; i++) { srcV += convert_uint4(vload4(id + (i & 0xFFFF), src + offset)); } vstore4(srcV, id, dst); }
const sampler_t sampler = 0 | 0x10 | 2; kernel void set_valuesInt(int start, global int* dest, unsigned int val) { int pos = get_global_id(0) + start; dest[pos] = val; }
kernel void kernel_sub_withDD4(global float* result_sub, int N) { float t1 = 99999.9; float4 t2 = t1 - (float4)(0, 0.1, 0.2, 0.3); int i = 0; for (i = 0; i < N; i++) { t2 -= 0.1f; t2 -= 0.1f; t2 -= 0.1f; t2 -= 0.1f; t2 -= 0.1f; t2 -= 0.1f; t2 -= 0.1f; t2 -= 0.1f; t2 -= 0.1f; ...
kernel void fft_div_vec_scalar(global float2* input1, unsigned int size, float factor) { for (unsigned int i = get_global_id(0); i < size; i += get_global_size(0)) { input1[i] /= factor; } }
kernel void assignArr(global int* a, const int val) { const int id = get_global_id(0); a[id] = 42; }
kernel void mult(global float* a, global float* b, global float* result) { int i; i = get_global_id(0); result[i] = a[i] * b[i]; }
kernel void SkipBackward(global float* deltaInput, global float* deltaOutput, const int nUnits, const int miniBatchSize) { const int iActivation = get_global_id(0); if (iActivation < miniBatchSize * nUnits) { deltaInput[iActivation] += deltaOutput[iActivation]; } }
const double d = 15; kernel void add(global int* x, global int* y, float z) { int i = get_global_id(0); y[i] = x[i] + z; }
kernel void kernel_mad_withoutDD4(global float* result_mad, int N) { float s = 1; float4 t1 = s + (float4)(0, 0.1, 0.2, 0.3); float4 t2 = s + (float4)(0, 0.1, 0.2, 0.3); float4 t3 = s + (float4)(0, 0.1, 0.2, 0.3); float4 t4 = s + (float4)(0, 0.1, 0.2, 0.3); float4 t5 = s + (float4)(0, 0.1, 0.2, 0.3); floa...
kernel void test_ulong4(global ulong* pin, global ulong* pout) { int x = get_global_id(0); ulong4 value; value = vload4(x, pin); value += (ulong4){(ulong)1, (ulong)2, (ulong)3, (ulong)4}; vstore4(value, x, pout); }
kernel void cospi_float8(global float8* src_0, global float8* dst) { int gid = get_global_id(0); dst[gid] = cospi(src_0[gid]); }
inline unsigned int GlobalIndex(unsigned int x, unsigned int y, unsigned int z, unsigned int w, unsigned int h, unsigned int d) { return (z * (w * h)) + (y * w) + x; } kernel void ReducemaxGPU(global unsigned int* gmax, global unsigned int* max) { (void)atomic_max(max, gmax[get_global_id(0)]); }
float lowerleft_iou(float* xmins, float* ymins, float* widths, float* heights, int i, int j) { float x0 = (((xmins[i]) > (xmins[j])) ? (xmins[i]) : (xmins[j])); float y0 = (((ymins[i]) > (ymins[j])) ? (ymins[i]) : (ymins[j])); float x1 = (((xmins[i] + widths[i]) < (xmins[j] + widths[j])) ? (xmins[i] + widths[i]) ...
int r(private int p, private int l) { return (l + p); } int z(private int k) { return (k + 1); } kernel void brahmaKernel(global int* buf) { int p = 1; int m = r(p, 9); buf[0] = m; }
kernel void test_clamp(global uchar3* out, global uchar3* in) { *out = clamp(*in, (uchar3)7, (uchar3)42); }
kernel void FWD_norm_alpha(const int N, const int startpos, local float* sm, global float* alpha, global float* lll) { size_t tid = get_local_id(0); size_t gid = get_global_id(0); size_t bls = get_local_size(0); size_t gls = get_global_size(0); float tidsum = 0.f; int i; for (i = gid; i < N; i += gls) { ...
kernel void compiler_double(global double* src, global double* dst) { int i = get_global_id(0); double d = 1.234567890123456789; if (i < 14) dst[i] = d * (src[i] + d); else dst[i] = 14; }
kernel void kernel__UniformAdd(global float* output, global const float* blockSums, const unsigned int outputSize) { unsigned int gid = get_global_id(0) * 2; const unsigned int tid = get_local_id(0); const unsigned int blockId = get_group_id(0); local float localBuffer[1]; if (tid < 1) { localBuffer[0] ...
kernel void porcess(global char* buffer) { int id = get_global_id(0); buffer[id] = 1; }
float addLogs(float A, float B) { float maxi = fmax(A, B); float corr = native_log(1.0 + native_exp(-fabs(A - B))); return maxi + corr; } kernel void llrOut(global float* alpha, global float* beta, global float* gamma, global float* llrOUT) { int _outputs[16] = {0, 0, 1, 1, 1, 1, 0, 0, 3, 3, 2, 2, 2, 2, 3, 3};...
kernel void test_kernel(global float* a, global float* b, global float* output) { size_t idx = get_global_id(0); output[idx] = (a[idx]) + (b[idx]); }
kernel void addCopy(global double* a, global const double* b, global const double* c) { int gid = get_global_id(0); a[gid] = b[gid] + c[gid]; }
void apple(global int* A, global int* B, int n) { A[n] = B[n + 2]; } kernel void bar(global int* A, global int* B, int n) { apple(A + 1, B, n); }
kernel void prefix_sum(global int* dst, global int* src, local int* b, local int* c) { const int g_id = get_global_id(0); const int len = get_global_size(0); int value = src[g_id]; b[g_id] = value; c[g_id] = value; barrier(0x01); for (int offset = 1; offset < len; offset <<= 1) { if (g_id >= offset)...
kernel void compiler_read_buffer(global float4* src0, global float4* src1, global float4* dst) { float4 sum = 0; int offset = 0, i = 0; int id = (int)get_global_id(0); int sz = (int)get_global_size(0); for (i = 0; i < 16; i++) { sum = sum + src0[offset + id] + src1[offset + id]; offset += sz; } ds...
kernel void bench_math_sqrt(global float* src, global float* dst, float pwr, unsigned int loop) { float result = src[get_global_id(0)]; for (; loop > 0; loop--) result = sqrt(result) + sqrt(pwr + result); dst[get_global_id(0)] = result; }
kernel void foo(global uchar3* a, global uchar3* b, global uchar3* c) { *a = bitselect(*a, *b, *c); }
kernel void compiler_math_2op(global float* dst, global float* src1, global float* src2) { int i = get_global_id(0); const float x = src1[i], y = src2[i]; float z; switch (i) { case 0: dst[i] = native_divide(x, y); break; case 1: dst[i] = fdim(x, y); break; case 2: dst[...
float4 pair_force(float4 pi, float4 pj, float4 ai, const unsigned int softening) { float3 r; r.x = pj.x - pi.x; r.y = pj.y - pi.y; r.z = pj.z - pi.z; float distSquare = r.x * r.x + r.y * r.y + r.z * r.z + softening; float invDist = rsqrt(distSquare); float invDistCube = invDist * invDist * invDist; flo...
kernel void kernelForTestingBadNameWithLengthHeigherThanOrEqualToTwoHundredAndFiftySixCharecterskernelToTestBadNameWithLengthHeigherThanOrEqualToTwoHundredAndFiftySixCharecterskernelToTestBadNameWithLengthHeigherThanOrEqualToTwoHundredAndFiftySixCharecterskernelName(global int* src, global int* dst) { dst[0] = src[0]...
kernel void array_set(global float* src, float val) { src[get_global_id(0)] = val; }
float pulseWave(float x, float length) { float h = -0.5 * cospi(2 * x) + 0.5; if (h > (1.0 - length)) { return 1.0; } else { return 0.0; } } float roof(float x, float y) { float cx = 5.0 * x; float cx2 = 5.0 * (x - 0.5); float cy = 5.0 * (y - 10.0); bool shift = ((int)cy) % 2 == 0; float c =...
kernel void cos_float(global float* src_0, global float* dst) { int gid = get_global_id(0); dst[gid] = cos(src_0[gid]); }
kernel void divide1D(global double2* data, const int size) { int idX = get_global_id(0); data[idX] /= size; }
kernel void compiler_upsample_long(global int* src1, global unsigned int* src2, global long* dst) { int i = get_global_id(0); dst[i] = upsample(src1[i], src2[i]); }
kernel void post_increment_long16(global long16* src_0, global long16* dst) { int gid = get_global_id(0); dst[gid] = src_0[gid]++; }
kernel void amdDeinterleaveFFTBlock(global const float* in, global float* out) { int glbl_id = get_global_id(0); out[glbl_id] = in[glbl_id * 2]; }
kernel void hash_join(global int* probe_column, const unsigned int probe_count, global int* build_column, const unsigned int build_count, global char* join_result) { int thread_idx = get_global_id(0); join_result[thread_idx] = build_column[thread_idx] == probe_column[thread_idx]; }
kernel void vec_reflect(float4 x_vec, float4 u, global float4* x_prime) { float4 p_mat[4]; u *= 1.41421356237309504880168872420969808f / length(u); p_mat[0] = (float4)(1.0f, 0.0f, 0.0f, 0.0f) - (u * u.x); p_mat[1] = (float4)(0.0f, 1.0f, 0.0f, 0.0f) - (u * u.y); p_mat[2] = (float4)(0.0f, 0.0f, 1.0f, 0.0f) - ...
kernel void ker_permute_fwd_transpose_stride(global float* out_data, const int n, const int c, const int h, const int w, global const int* out_stride, global const int* in_stride, global const float* in_data) { int global_idx = get_global_id(0); int local_idx = get_local_id(0); local float tile[3][256]; int out...
kernel void kernel_tan_withoutDD1(global float* result_tan, int N) { float t1 = 1.23; float t2 = 1.1; float t3 = t1; float t4 = t3; float t5 = t4; float t6 = t5; float t7 = t6; float t8 = t7; float j = 1.0; for (j = 0.0; j < 10 * N; j = j + 1.0) { t1 = tan(j); t2 = tan(j); t3 = tan(j); ...
kernel void dynproc_kernel(int iteration, global int* restrict gpuWall, global int* restrict gpuSrc, global int* restrict gpuResults, int cols, int startStep, int border) { int bx = get_group_id(0); int tx = get_local_id(0); local int prev[256]; local int result[256]; int small_block_cols = 256 - (iteration...
kernel void writeKernel(volatile global unsigned int* in, volatile global uint4* out, unsigned int ni, unsigned int val, unsigned int nk) { uint4 pval; local unsigned int lval; unsigned int i, idx; if (get_local_id(0) == 0) lval = in[get_num_groups(0) + 1]; barrier(0x01); pval = (uint4)(lval, lval, l...
kernel void subc_f64(unsigned int length, global double* a, double b, global double* out) { const unsigned int id = get_global_id(0); if (id < length) { out[id] = a[id] - b; } }
kernel void profile_items(global int4* x, int num_ints) { int num_vectors = num_ints / (4 * get_global_size(0)); x += get_global_id(0) * num_vectors; for (int i = 0; i < num_vectors; i++) { x[i] += 1; x[i] *= 2; x[i] /= 3; } }
kernel void test_atomic_max(global unsigned* ptr, unsigned val) { atomic_max(ptr, val); }
constant char hw[] = "Hej pa dig!"; kernel void hello(global char* out) { size_t tid = get_global_id(0); out[tid] = hw[tid]; }
kernel void foo(global char2* a, global char2* b, global char2* c) { *a = max(*b, *c); }
kernel void kenhaha(global const float4* a, global const float4* b, global float* c) { int gid = get_global_id(0); c[gid] = 4.0; }
kernel void test_fa1_1_3_kern(global float* a0, global float* b0, global float* b1, global float* b2) { unsigned int gtid = get_global_id(0); float tmp0 = a0[gtid] + 0.1f; barrier(0x01); b0[gtid] = (0.0f + 1.1f) * (+tmp0); b1[gtid] = (1.0f + 1.1f) * (+tmp0); b2[gtid] = (2.0f + 1.1f) * (+tmp0); }
kernel void compiler_unstructured_branch0(global int* src, global int* dst) { int id = (int)get_global_id(0); dst[id] = src[id]; if (dst[id] >= 0) goto label; do { dst[id] = 1; label: id += get_local_size(0); } while (id < 32); }
kernel void kernel_20(global float* inputA, global float* inputB, global float* output, const unsigned int count) { float A = 0; float dif; for (int i = 0; i < count; i++) { dif = inputA[i] - inputB[i]; if (dif < 0) dif *= (-1); A += dif / (inputA[i] + inputB[i]); } output[20] = sqrt(A); }
int g2(private int y1, private int r, private int t) { return ((r + y1) - t); } int n(private int y1, private int o) { return (o - g2(y1, y1, 2)); } int g(private int y1, private int m) { return n(y1, 5); } int f(private int y) { int y0 = y; int y1 = y0; return g(y1, y1); } int z(private int y3) { return ...
kernel void test_shuffle(const global char16* in, global char16* out) { char16 tmp = in[0]; char16 tmp1 = in[1]; out[5] = tmp; out[6] = tmp1; out[0] = shuffle(tmp, (uchar16)(7, 6, 4, 8, 1, 12, 13, 1, 0, 9, 14, 15, 4, 3, 8, 6)); out[1] = shuffle2(tmp, tmp1, (uchar16)(1, 7, 11, 18, 21, 15, 8, 9, 0, 19, 2, ...
kernel void kernel_mad_withoutDD2(global float* result_mad, int N) { float s = 1; float2 t1 = s + (float2)(0.2, 0.3); float2 t2 = s + (float2)(0.2, 0.3); float2 t3 = s + (float2)(0.2, 0.3); float2 t4 = s + (float2)(0.2, 0.3); float2 t5 = s + (float2)(0.2, 0.3); float2 t6 = s + (float2)(0.2, 0.3); float2...
kernel void gemm_base(global float* out, const global float* in, const global float* weight, const global float* bias, const int dim_hidden, const int dim_in) { const int GID = get_global_id(0); const int n = GID / dim_hidden; const int hidden = GID % dim_hidden; const int in_offset = n * dim_in; float z = bi...
int add_op(int a, int by) { return a + by; } kernel void add(global int* a, global int* b, int by, unsigned int length) { int i = get_global_id(0); if (i < length) b[i] = add_op(a[i], by); }
kernel void square(global float* inputData, global float* outputData, const int data_size) { int id = get_global_id(0); outputData[id] = inputData[id] * inputData[id]; }
kernel void sort_n(global int* a, int N, int k, int j) { int i = get_global_id(0); int ixj = i ^ j; if (i >= N || ixj >= N) return; if (ixj > i) { int iValue = a[i], ixjValue = a[ixj]; if ((i & k) == 0 && iValue > ixjValue) { a[i] = ixjValue; a[ixj] = iValue; } if ((i & k) !=...
kernel void scan_bl(global int* A) { int id = get_global_id(0); int N = get_global_size(0); int t; for (int stride = 1; stride < N; stride *= 2) { if (((id + 1) % (stride * 2)) == 0) A[id] += A[id - stride]; barrier(0x02); } if (id == 0) A[N - 1] = 0; barrier(0x02); for (int strid...
float theKernel_core(float a, float b) { a *= 2; b *= 2; a += b; b += a; return a + b; } kernel void theKernel(int numElements, global const float* input0, global const float* input1, global float* output) { int gid = get_global_id(0); if (gid < numElements) { float a = input0[gid]; float b = inp...
kernel void sqr_floats(global const float* a, global float* out, int n) { int i = get_global_id(0); if (i >= n) return; out[i] = a[i] * a[i]; }
kernel void subtract_numbers(global float* a, float b) { float c = a[0] - b; }
kernel void testWorkGroupIAddSigned(int a, global int* res) { res[0] = work_group_reduce_add(a); }
kernel void buildSpikes(global float* spike, global int* spikeIndex, global float* out, int outSize, int currentBump, local int* tmp) { float accumulator = 0; int gtid = get_global_id(0); int ltid = get_local_id(0); int spikeLoop = 0; for (int groupLoop = 0; (groupLoop - 1) * (int)get_global_size(0) + 1 < out...
kernel void uninitialized_global_buffer(global float* input, global float* output) { output[get_global_id(0)] = *input; }
kernel void kernel_atan2pi_withoutDD1(global float* result_atan2pi, int N) { float t1 = 2.2; float t2 = 2.0; float t3 = 2.3; float t4 = 2.3; float t5 = 2.3; float t6 = 2.3; float t7 = 2.3; float t8 = 2.3; float t9 = 2.3; float t10 = 2.3; float i = 0.0; float j = 0.01; float n = (float)(N); ...
kernel void post_decrement_int(global int* src_0, global int* dst) { int gid = get_global_id(0); dst[gid] = src_0[gid]--; }
kernel void vector_add(global unsigned int* a, global unsigned int* b, global unsigned int* out) { unsigned int a_local[2048]; unsigned int b_local[2048]; unsigned int out_local[2048]; local_a: for (size_t i = 0; i < 2048; i++) { a_local[i] = a[i]; } local_b: for (size_t i = 0; i < 2048; i++) { b_...
kernel void add(global float* restrict a, global float* restrict b, global float* restrict c, global float* restrict d) { int i = get_global_id(0); c[i] = a[i] + b[i]; d[i] += c[i]; }
kernel void plus(global int* out, int in) { out[0] = +in; }
kernel void brahmaKernel(global int* buf) { while ((buf[0] < 5)) { buf[0] = (buf[0] + 1); }; }
kernel void Dropout(global float* activations, const int nActivations, const float dropoutParameter, const ulong randomSeed) { const int iActivation = get_global_id(0); if (iActivation < nActivations) { ulong thisSeed = randomSeed + iActivation; thisSeed = (thisSeed * 0x5DEECE66DL + 0xBL) & ((1L << 48) - 1...
kernel void Integer_multiplication_0_10(global int* dataArray, long iter, int interval) { global int* curArray = dataArray + get_global_id(0) * interval; int a0, a1, a2, a3, a4, a5, a6, a7, a8, a9; int addend; a0 = curArray[0]; a1 = curArray[1]; a2 = curArray[2]; a3 = curArray[3]; a4 = curArray[4]; a5...
kernel void Stpsv_naive(const int uplo, const int trans, const int diag, int n, global float* ap, global float* x, int incx) { bool ntrans = trans == 0; bool ltriangle = uplo == 1; bool ndiag = diag == 0; if (ntrans) { if (ltriangle) { unsigned int starting = 0; for (int i = 0; i < n; i++) { ...
kernel void InclusiveLocalScan(global int* block_sums, local int* scratch, const unsigned int block_size, const unsigned int count, global int* data, global int* scan_data) { const unsigned int gid = get_global_id(0); const unsigned int lid = get_local_id(0); if (gid < count) { scratch[lid] = data[gid]; } ...
kernel void loglike(global float* chi_buffer, global float* data_err, global float* output, private unsigned int n) { size_t i = get_global_id(0); if (i < n) { output[i] = -1 * native_log(data_err[i]) - chi_buffer[i] * chi_buffer[i] / 2; } }
kernel void compiler_global_memory_barrier(global int* dst, global int* src) { src[get_local_size(0) * (2 * get_group_id(0)) + get_local_id(0)] = get_local_id(0); src[get_local_size(0) * (2 * get_group_id(0) + 1) + get_local_id(0)] = get_local_id(0); barrier(0x02); dst[get_local_size(0) * (2 * get_group_id(0)) ...
kernel void fill_float(global float* output, const float proto, const unsigned int size) { unsigned int tid = get_global_id(0); if (tid < size) output[tid] = proto; }
kernel void Srot_noinc(global float* x, global float* y, float c, float s) { unsigned int gid = get_global_id(0); float current_x = x[gid]; float current_y = y[gid]; float sy = s * current_y; float _x = fma(c, current_x, sy); float cy = c * current_y; y[gid] = fma(-s, current_x, cy); x[gid] = _x; }
kernel void s_vector_sum_scalar(global float* g_idata, global float* g_odata, unsigned int n) { int i = get_local_id(0); if (i == 0) { for (int j = 0; j < n; j++) g_odata[0] += g_idata[j]; } }
kernel void FillBufferImmediate(global uchar* ptr, unsigned int dstSshOffset, const unsigned int value) { unsigned int dstIndex = get_global_id(0); global uchar* pDst = (global uchar*)ptr + dstSshOffset; pDst[dstIndex] = value; }
inline float mydot(global float* a, global float* b, const int size) { float out = 0.0f; for (int i = 0; i < size; i++) { out += a[i] * b[i]; } return out; } inline float dotproduct(global float* a, global float* b, const int size) { float out = 0.0f; for (int i = 0; i < size; i++) { out += a[i] * ...
kernel void compiler_abs_diff_ushort2(global ushort2* x, global ushort2* y, global ushort2* diff) { int i = get_global_id(0); diff[i] = abs_diff(x[i], y[i]); }
kernel void camera_sobel(global unsigned short* restrict frame_in, global unsigned int* restrict frame_out, const int iterations, const unsigned int threshold) { int Gx[3][3] = {{-1, -2, -1}, {0, 0, 0}, {1, 2, 1}}; int Gy[3][3] = {{-1, 0, 1}, {-2, 0, 2}, {-1, 0, 1}}; unsigned short rows[2 * 640 + 3]; int coun...
kernel void clkernel_add_scalar(const int num, float x, global const float* in, global float* out) { const int i = get_global_id(0); if (i >= num) return; out[i] = in[i] + x; }
kernel void raySort(global float* dir, global float* o, global int* indices, int count, int i) { int iGID = get_global_id(0); if (i == 0) { while (iGID < count) { indices[iGID] = iGID; iGID += get_global_size(0) + 1; } iGID = get_global_id(0); } if (3 * iGID + 2 + i > count) retur...
float dev_round_float(float value) { int newValue = (int)(value); if (value - newValue < .5f) return newValue; else return newValue++; } float calcLikelihoodSum(global unsigned char* I, global int* ind, int numOnes, int index) { float likelihoodSum = 0.0; int x; for (x = 0; x < numOnes; x++) lik...
kernel void test_instructions(const int i0, const int i1, const float f0, const float f1, global int* intOut, global float* floatOut) { intOut[0] = i0 + i1; intOut[1] = i0 - i1; intOut[2] = i0 * i1; intOut[3] = i0 / i1; intOut[4] = i0 % i1; intOut[5] = max(i0, i1); intOut[6] = min(i0, i1); intOut[7] = (...
kernel void taskParallelCalculateViscosityForce(global float3* viscosityForces, global float3* positions, global float3* velocities, global float* densities, const float kernelSize, const int howMany, const float mass, const float viscosityConstant) { int id = get_global_id(0); float3 r; float pi = 3.14; for (...
kernel void filter(global float* xs, global int* bitsum, float pivot) { int i = (get_global_id(0) << 1); int j = i + 1; int i_bit = xs[i] <= pivot ? 1 : 0; int j_bit = xs[j] <= pivot ? 1 : 0; bitsum[i] = i_bit; bitsum[j] = i_bit + j_bit; }
kernel void test_arg_7_2_kern(global int* a0, global int* a1, global int* a2, global int* a3, global int* a4, global int* a5, global int* a6, global int* b0, global int* b1) { unsigned int gtid = get_global_id(0); int tmp0 = a0[gtid] + 0; int tmp1 = a1[gtid] + 1; int tmp2 = a2[gtid] + 2; int tmp3 = a3[gtid] +...