kernel_code
stringlengths
49
1.22M
kernel void s_vector_sub(global const float* a, global const float* b, global float* c, int iNumElements) { int i = get_global_id(0); if (i >= iNumElements) { return; } c[i] = a[i] - b[i]; }
kernel void mmul(const int Mdim, const int Ndim, const int Pdim, global float* A, global float* B, global float* C) { int k, j; int i = get_global_id(0); float tmp; if (i < Ndim) { for (j = 0; j < Mdim; j++) { tmp = 0.0f; for (k = 0; k < Pdim; k++) tmp += A[i * Ndim + k] * B[k * Pdim + j...
kernel void Stencil1(global float* in, global float* out, int width, int height) { int num = get_global_id(0); if (num < width || (num % width) == 0 || (num % width) == width - 1 || num >= (width * height - width)) { out[num] = in[num]; } else { out[num] = (in[num - 1] + in[num + 1] + in[num - width] + i...
kernel void updateXR(global float* alpha, global float* p, global float* aTimesP, global float* x, global float* r) { int id = get_global_id(0); x[id] += (*alpha) * p[id]; r[id] -= (*alpha) * aTimesP[id]; }
kernel void extra_serial_reduce(unsigned int count, unsigned int offset, global float* output, unsigned int output_offset, global float4* _buf0) { float result = length(_buf0[offset]); for (unsigned int i = offset + 1; i < count; i++) result = ((result) * (length(_buf0[i]))); output[output_offset] = result; }
kernel void profile_edges_c(global double2* x, global double* f, unsigned int NxNr, unsigned int Nx, unsigned int Nf) { unsigned int i_cell = (unsigned int)get_global_id(0); if (i_cell < NxNr) { unsigned int ir = i_cell / Nx; unsigned int ix = i_cell - ir * Nx; if (ix < Nf) { x[i_cell].s0 *= f[ix]...
kernel void abs_uchar(global uchar* src_0, global uchar* dst) { int gid = get_global_id(0); dst[gid] = abs(src_0[gid]); }
kernel void sum_half_improved(global short2* in, global short* out, unsigned int reduce_factor) { int x = get_global_id(0); int size0 = get_global_size(0); unsigned int begin = x; int i; int sum = 0; for (i = 0; i < reduce_factor / 2; i++) { sum += in[begin].x; sum += in[begin].y; begin += size0...
kernel void test_arg_1_2_kern(global float* a0, global float* b0, global float* b1) { unsigned int gtid = get_global_id(0); float tmp0 = a0[gtid] + 0.1f; b0[gtid] = (0.0f + 1.1f) * (+tmp0); b1[gtid] = (1.0f + 1.1f) * (+tmp0); }
kernel void matrix_opencl(global int* val, unsigned int nx, global int* err, int factor) { const int i = get_global_id(0); if (i >= nx) return; if (val[i] != i * factor) *err = i; else val[i] *= -1; }
kernel void kernel_ceil_withoutDD1(global float* result_ceil, int n) { float p1 = 1.23; float p2 = 1.23; float p3 = 1.23; float p4 = 1.23; float p5 = 1.23; float p6 = 1.23; float p7 = 1.23; float p8 = 1.23; float p9 = 1.23; float p10 = 1.23; float p11 = 1.23; float p12 = 1.23; float p13 = 1.23...
kernel void sqrt_float2(global float2* src_0, global float2* dst) { int gid = get_global_id(0); dst[gid] = sqrt(src_0[gid]); }
kernel void VectVectAddDPKernel(global double* d_VectA, global double* d_VectB, global double* output) { size_t id = get_global_id(0); output[id] = d_VectA[id] + d_VectB[id]; }
kernel void getCollisions(global float4* minMaxBuffer, global int* collisionBuffer, const ulong numberOfBoxes) { unsigned int index = get_global_id(0); if (index >= numberOfBoxes) return; float3 currentMin = minMaxBuffer[(index * 2u)].xyz; float3 currentMax = minMaxBuffer[(index * 2u) + 1u].xyz; int res...
kernel void test(const int aint, const unsigned auint, long along, unsigned long aulong, const float afloat, global int* intout, global unsigned int* uintout, global long* longout, global unsigned long* ulongout, global float* floatout) { const int globalid = get_global_id(0); intout[globalid] = aint + globalid; ...
kernel void reduce(global const unsigned int* in, global unsigned int* isums, const int n, local unsigned int* lmem, const int shift) { int region_size = ((n / 4) / get_num_groups(0)) * 4; int block_start = get_group_id(0) * region_size; int block_stop = (get_group_id(0) == get_num_groups(0) - 1) ? n : block_sta...
kernel void test_prime(const int maybePrime, global bool* out) { float tmp = maybePrime; tmp = sqrt(tmp); int root = ceil(tmp); for (int i = 2; i <= root; i++) { if (maybePrime % i == 0) { *out = false; return; } } *out = true; }
kernel void DotProduct(global double* a, global double* b, global double* c, long iNumElements) { int iGID = get_global_id(0); if (iGID >= iNumElements) return; int iInOffset = iGID << 2; c[iGID] = a[iInOffset] * b[iInOffset] + a[iInOffset + 1] * b[iInOffset + 1] + a[iInOffset + 2] * b[iInOffset + 2] + a[...
kernel void inplace_add(global float* vec1, global const float* float2, unsigned int size) { for (unsigned int i = get_global_id(0); i < size; i += get_global_size(0)) vec1[i] += float2[i]; }
kernel void adjust_score(global int4* values, global int4* final) { int global_id = get_global_id(0); float4 float_value = (float4)(values[global_id].x, values[global_id].y, values[global_id].z, values[global_id].w); float4 float_final = sqrt(float_value) * 10; final[global_id] = (int4)(float_final.x, float_...
kernel void test_stream_read_int(global int* dst) { dst[0] = ((1 << 16) + 1); }
kernel void brahmaKernel(global int* buf) { int i = 2; for (int i0 = 1; (i0 <= 2); i0++) { buf[1] = i0; }; }
int g(private int q, private int w) { return ((1 + q) + w); } int t(private int p) { return (7 - p); } int f(private int m, private int k) { return (g(1, 2) - ((m * k) / t(53))); } kernel void brahmaKernel(global int* buf) { buf[0] = f(1, 4); }
kernel void half_exp_float(global float* src_0, global float* dst) { int gid = get_global_id(0); dst[gid] = half_exp(src_0[gid]); }
kernel void notUseLocal(int N, global float* inout) { if ((int)get_global_id(0) < N) { inout[get_global_id(0)] += 1.0f; } }
kernel void part1(global float* a, global float* b, global float* c) { unsigned int i = get_global_id(0); c[i] = a[i] + b[i]; }
kernel void testFOrdLessThanEqual(float2 a, float2 b, global int2* res) { res[0] = a <= b; }
kernel void render(global char* input, global char* output, int width, int height) { unsigned int i = get_global_id(0); unsigned int i_mul_4 = i * 4; unsigned int x, y; y = i / width; x = i % width; if ((x < width - 1) && (x > 0) && (y > 0) && (y < height - 1)) { unsigned int temp; temp = -inpu...
kernel void spinFact(global double2* w, int n) { unsigned int i = get_global_id(0); double2 angle = (double2)(2 * i * 3.14159265358979323846 / (double)n, (2 * i * 3.14159265358979323846 / (double)n) + 1.57079632679489661923); w[i] = cos(angle); }
float linear_to_gamma_2_2(float value) { if (value > 0.003130804954f) return 1.055f * native_powr(value, (1.0f / 2.4f)) - 0.055f; return 12.92f * value; } float gamma_2_2_to_linear(float value) { if (value > 0.04045f) return native_powr((value + 0.055f) / 1.055f, 2.4f); return value / 12.92f; } kernel...
kernel void kernel_fmax_withoutDD4(global float* result_fmax, int N) { float4 t1 = -1 + (float4)(0); float4 t2 = -1 + (float4)(0); float4 t3 = t1; float4 t4 = t3; float4 t5 = t4; float4 t6 = t5; float4 t7 = t6; float4 t8 = t7; float4 t9 = t8; float4 t10 = t9; float4 t11 = -1 + (float4)(0); float...
kernel void foo(global int* data, local int* l) { int x = l[0]; barrier(0x02); data[0] = x; }
kernel void kernel0_local_write(global char* ptr, unsigned long memsize) { int i; global unsigned long* buf = (global unsigned long*)ptr; int idx = get_global_id(0); unsigned long n = memsize / (1024 * 1024); int total_num_threads = get_global_size(0); for (i = idx; i < n; i += total_num_threads) { glo...
kernel void CopyBufferToBufferMiddle(const global unsigned int* pSrc, global unsigned int* pDst, unsigned int srcOffsetInBytes, unsigned int dstOffsetInBytes) { unsigned int gid = get_global_id(0); pDst += dstOffsetInBytes >> 2; pSrc += srcOffsetInBytes >> 2; uint4 loaded = vload4(gid, pSrc); vstore4(loaded, ...
kernel void vec_add(global int* in1, global int* in2, global int* out) { int index = get_global_id(0); out[index] = in1[index] + in2[index]; }
kernel void reduce0(global float* g_idata, global float* g_odata, unsigned int n, local float* sdata) { unsigned int tid = get_local_id(0); unsigned int i = get_global_id(0); sdata[tid] = (i < n) ? g_idata[i] : 0; barrier(0x01); for (unsigned int s = 1; s < get_local_size(0); s *= 2) { if ((tid % (2 * ...
kernel void addition_assignment_scalar(global double* a, const double b, const int n) { int i = get_global_id(0); if (i > n) return; a[i] += b; }
kernel void array_sgd_f32(global float* x, global float* dx, float learn_rate) { unsigned int i = get_global_id(0); x[i] += learn_rate * dx[i]; }
kernel void testWorkGroupFMin(float a, global float* res) { res[0] = work_group_reduce_min(a); }
kernel void sph_kernel_hashParticles(int kParticleCount, int nx, int ny, int nz, float h, global float4* pos, global uint2* partIdx, global float* nxtpos) { unsigned int gid = get_global_id(0); float3 tempPos; float _2h = 2 * h; float rangeRatioX = (nx * _2h - 0) / (1 - (-1)); float rangeRatioY = (ny * _2h ...
kernel void kernel_sincos_withDD1(global float* result_sincos, int N) { float t1 = 1.0; float t2; int i = 0; for (i = 0; i < N; i++) { t1 = sincos(t1, &t2); t1 = sincos(t1, &t2); t1 = sincos(t1, &t2); t1 = sincos(t1, &t2); t1 = sincos(t1, &t2); t1 = sincos(t1, &t2); t1 = sincos(t1, &...
kernel void abs_f64(unsigned int length, global double* a, global double* out) { const unsigned int id = get_global_id(0); if (id < length) { out[id] = fabs(a[id]); } }
kernel void kernel_memory_alignment_local_char(global unsigned int* results) { local char mem0[3]; local char2 mem2[3]; local char3 mem3[3]; local char4 mem4[3]; local char8 mem8[3]; local char16 mem16[3]; results[0] = (unsigned int)&mem0[0]; results[1] = (unsigned int)&mem2[0]; results[2] = (unsigned...
kernel void compute_integer_v1(global int* ptr, int _A) { int x = _A; int y = (int)get_local_id(0); x = (y * x) + y; y = (x * y) + x; x = (y * x) + y; y = (x * y) + x; ; x = (y * x) + y; y = (x * y) + x; x = (y * x) + y; y = (x * y) + x; ; x = (y * x) + y; y = (x * y) + x; x = (y * x) + y...
kernel void kernel_update(global int* d_parents, global int* d_shadow, int vertex_cnt) { int tid = get_global_id(0); int getnumsum = get_global_size(0); for (; tid < vertex_cnt; tid += getnumsum) { if (tid >= vertex_cnt) return; d_parents[tid] = d_shadow[tid]; } }
kernel void infinity(global int* index_array, global int* data_array, unsigned long array_size, int nthreads, unsigned long portion_size, int do_shuffle, int read_bench) { size_t idx = get_global_id(0); int temp, garbage = 0; int i; int startof_portion, endof_portion; if (idx < nthreads) { if (do_shuffle...
kernel void gegl_invert(global const float4* in, global float4* out) { int gid = get_global_id(0); float4 in_v = in[gid]; float4 out_v; out_v.xyz = (1.0f - in_v.xyz); out_v.w = in_v.w; out[gid] = out_v; }
kernel void doubleInput(global float* input, global float* output) { int tid = get_global_id(0); output[tid] = 2 * 3.14575454 * 0.2312232 * 1.3232 * 0.99943 * 2.43435334 * 1.232342342 * 0.54748348 * 2.34539234 * input[tid]; }
constant uchar message[12] = "Hello World"; kernel void test_constant_storage(global uchar* out) { size_t gid = get_global_id(0); out[gid] = message[gid]; }
kernel void test(global float* a, float b, float c) { *a = copysign(b, c); }
kernel void test3(global float* A, global float* B, float K) { for (int i = 0; i < 800; ++i) A[i] *= B[i] + K; }
kernel void atan_float8(global float8* src_0, global float8* dst) { int gid = get_global_id(0); dst[gid] = atan(src_0[gid]); }
kernel void complex_conj_mult(global float* a_r, global float* a_i, global float* b_r, global float* b_i, global float* result_r, global float* result_i) { int i; i = get_global_id(0); result_r[i] = a_r[i] * b_r[i] + a_i[i] * b_i[i]; result_i[i] = a_r[i] * b_i[i] - a_i[i] * b_r[i]; }
void gauss_real(global double* a, global double* b, unsigned long k, unsigned long i, unsigned long col, unsigned char otherm) { if (isnotequal(a[i * col + i], 0.0) && !isnan(a[i * col + i])) { if (isnotequal(a[i * col + k], 0.0)) { double aa = a[k * col + k] / a[i * col + k], bb; for (unsigned long j...
int Calculate2DIndex(int x, int y, int DATA_W) { return x + y * DATA_W; } int Calculate3DIndex(int x, int y, int z, int DATA_W, int DATA_H) { return x + y * DATA_W + z * DATA_W * DATA_H; } int Calculate4DIndex(int x, int y, int z, int t, int DATA_W, int DATA_H, int DATA_D) { return x + y * DATA_W + z * DATA_W *...
kernel void es_phase_1(global unsigned int* restrict data, global unsigned int* restrict increments, local unsigned int* tmp, unsigned int len) { const unsigned int thread = get_local_id(0); const unsigned int block = get_group_id(0); const unsigned int threads_per_block = get_local_size(0); const unsigned int ...
kernel void unary_plus_long8(global long8* src_0, global long8* dst) { int gid = get_global_id(0); dst[gid] = +src_0[gid]; }
kernel void foo(global float2* A, float2 edge, float2 x) { *A = step(edge, x); }
kernel void initialiseArraysKernel(global double* restrict A, global double* restrict B, global double* restrict C) { size_t tid = get_global_id(0); A[tid] = 1.0; B[tid] = 2.0; C[tid] = 0.0; }
float lattice(int ix, int iy, float fx, float fy) { const float gradients[] = {0.28192107956352164, -0.5956361289287839, -0.9749063224375614, 0.7931623407693271, -0.41883940789368346, 0.8876980565063934, 0.6826149653676965, 0.4578410690298531, -0.16545894801372785, 0.44363978274150795, 0.27760000566512155, 0.0082...
kernel void perBlockAdditionByKey(global unsigned int* keySumArray, global int* postSumArray, global unsigned int* keys, global int* vals, const unsigned int vecSize) { size_t gloId = get_global_id(0); size_t groId = get_group_id(0); size_t locId = get_local_id(0); if (gloId >= vecSize) return; int scan...
void compute_flux_contribution(private float* density, private float3* momentum, private float* density_energy, float pressure, private float3* velocity, private float3* fc_momentum_x, private float3* fc_momentum_y, private float3* fc_momentum_z, private float3* fc_density_energy) { (*fc_momentum_x).x = (*velocity).x...
kernel void calc_gamma_dev(global float* gamma_sum_d, global float* alpha_d, global float* beta_d, int nstates, int t) { unsigned int idx = get_group_id(0) * get_local_size(0) + get_local_id(0); if (idx < nstates) { gamma_sum_d[idx] += alpha_d[(t * nstates) + idx] * beta_d[(t * nstates) + idx]; } }
inline float vdash(float v, float rec, float cur) { return 0.04F * v * v + 5 * v + 140 - rec + cur; } inline float udash_RS(float v, float rec) { return 0.02F * (0.2F * v - rec); } inline float udash_IB(float v, float rec) { return 0.02F * (0.2F * v - rec); } inline float2 x_RK_RS(float x, float u, float cur, ...
kernel void STREAM_Scale(global double* a, global double* b, global double* scale, global int* len) { int threadIdX = get_local_id(0); int workGroupSize = get_global_size(0); int idx = get_global_id(0); if (idx < *len) b[idx] = (*scale) * a[idx]; }
kernel void bitselect_uint4uint4uint4(global uint4* src_0, global uint4* src_1, global uint4* src_2, global uint4* dst) { int gid = get_global_id(0); dst[gid] = bitselect(src_0[gid], src_1[gid], src_2[gid]); }
kernel void advance_spikeHit_ps_pa(const float t, const int step, global const int* hasFireds, global float* dss_PSR, global const float* dss_W, global const float* dss_decay, global const float* dss_U, global const float* dss_D, global const float* dss_F, global float* dss_u, global float* dss_r, global float* dss_las...
kernel void lowPass(global const float2* in, global float2* out, const unsigned int windowSize) { size_t x = get_global_id(0); float2 value = (float2)0.0f; for (unsigned int i = x; i < x + windowSize; i++) value += in[i]; out[x + windowSize - 1] = value / (float2)windowSize; }
kernel void equal_shortshort(global short* src_0, global short* src_1, global int* dst) { int gid = get_global_id(0); dst[gid] = (int)(src_0[gid] == src_1[gid]); }
kernel void vecsum(global int* restrict vsum, global const int* restrict v1, global const int* restrict v2, int nels) { const int i = get_global_id(0); if (i >= nels) return; vsum[i] = v1[i] + v2[i]; }
kernel void lockBlock(global long* iterations, global int* result) { const int id = get_global_id(0); long i = id - 1; while (*result != 1) { if (~i | (id & (1 << 60))) *result = 1; i++; }; }
kernel void mad_hi_ushort4ushort4ushort4(global ushort4* src_0, global ushort4* src_1, global ushort4* src_2, global ushort4* dst) { int gid = get_global_id(0); dst[gid] = mad_hi(src_0[gid], src_1[gid], src_2[gid]); }
float addRows(float* row) { float ret = 0.0f; for (int i = 0; i < 20; i++) { ret = ret + row[i]; } return ret; } kernel void add(global float* a, global float* b) { int id = get_global_id(0); b[id] = 0.0f; b[id] = addRows(&a[id * 10]); }
unsigned __popc(unsigned int x) { if (x == 0) return 0; if ((x &= x - 1) == 0) return 1; if ((x &= x - 1) == 0) return 2; if ((x &= x - 1) == 0) return 3; if ((x &= x - 1) == 0) return 4; if ((x &= x - 1) == 0) return 5; if ((x &= x - 1) == 0) return 6; if ((x &= x - 1) == 0)...
kernel void cholesky_decomp_double(global double* restrict A, global double* restrict L, int n) { int i, j, k; for (i = 0; i < n; i++) { for (j = 0; j < (i + 1); j++) { double s = 0; for (k = 0; k < j; k++) s += L[i * n + k] * L[j * n + k]; L[i * n + j] = (i == j) ? sqrt(A[i * n + i]...
kernel void kernel_correlation(int m, int n, float float_n, global float* restrict data, global float* restrict symmat, global float* restrict mean, global float* restrict stddev) { int i, j, j1, j2; float eps = 0.1f; for (j = 0; j < m; j++) { mean[j] = 0.0; for (i = 0; i < n; i++) mean[j] += data...
kernel void test_atomic_xor(global unsigned* ptr, unsigned val) { atomic_xor(ptr, val); }
kernel void block(global float* b, int nx, int ny, int nz, int ldy, int ldz, float multiplier) { const int i = get_global_id(0); if (i < (nz * ldz) + (ny * ldy) + nx) b[i] = b[i] * multiplier; }
typedef unsigned char(uchar); kernel void log_execve(global uchar* log, local uchar* output, global uchar* storage) { uchar* input = log[get_global_id(0)]; output[get_local_id(0)] = input; barrier(0x01); int i; uchar** store; if (get_local_id(0) == 0) { for (i = 0; i < get_local_size(0); i++) { ...
kernel void brahmaKernel(global int* buf) { for (int i = 1; (i <= 3); i++) { buf[0] = i; }; }
kernel void test_popcount(const global int* in, global int* out) { unsigned int gid = get_global_id(0); out[gid] = (int)popcount((short)in[gid]); }
void helper_bicgstab_kernel1_parallel_reduction(local float* tmp_buffer) { for (unsigned int stride = get_local_size(0) / 2; stride > 0; stride /= 2) { barrier(0x01); if (get_local_id(0) < stride) tmp_buffer[get_local_id(0)] += tmp_buffer[get_local_id(0) + stride]; } } float bicgstab_kernel1_inner_pr...
kernel void fastWalshTransform(global float* tArray, const int step) { unsigned int tid = get_global_id(0); const unsigned int group = tid % step; const unsigned int pair = 2 * step * (tid / step) + group; const unsigned int match = pair + step; float T1 = tArray[pair]; float float2 = tArray[match]; t...
kernel void cubedPointcloud(global char* v) { unsigned int i = get_global_id(0); v[i] = v[i] * v[i] * v[i] * 0.15f; }
kernel void test_remove_constant_load_in_loops_opt(global float a[], global float b[]) { for (int j = 0; j < 200; j++) { for (int i = 0; i < 200; i++) { a[i + j * 200] = i * j; } } for (int i = 0; i < 40000; i++) { b[i] = i; } }
__attribute__((max_work_group_size(1000))) kernel void softmax(global float* pdata) { const int x = get_global_id(0); pdata[x] = exp(pdata[x]); }
kernel void add_char16char16(global char16* src_0, global char16* src_1, global char16* dst) { int gid = get_global_id(0); dst[gid] = src_0[gid] + src_1[gid]; }
kernel void simplekernel(global int* array, const int singlevalue) { int i = get_global_id(0); array[i] = array[i] * singlevalue; }
__attribute__((intel_reqd_sub_group_size(16))) kernel void CopyBuffer(global unsigned int* src, global unsigned int* dst) { int id = (int)get_global_id(0); dst[id] = src[id]; }
kernel void reduce(global uint4* src, global unsigned int* globalMin) { atom_min(globalMin, globalMin[get_global_id(0)]); }
float lineShape(float gamma, float delta, float S); float peakScatteringRate(float3 k, float3 v, float gamma, float delta, float S); float gaussianBeamProfile(float3 k, float3 r0, float sigma, float3 r); kernel void countEmissions(global float* meanN, global float* auxRandNumbers, int nMax, global int* numEmissions, in...
kernel void scalars(global unsigned int* result, char c, short s, int i, long l, uchar uc, ushort us, unsigned int ui, ulong ul, float f) { ulong cval = convert_ulong((uchar)c); ulong sval = convert_ulong((ushort)s); ulong ival = convert_ulong((unsigned int)i); ulong lval = convert_ulong((unsigned int)l); ulo...
kernel void rotate_char8char8(global char8* src_0, global char8* src_1, global char8* dst) { int gid = get_global_id(0); dst[gid] = rotate(src_0[gid], src_1[gid]); }
constant float array[2] = {0.0f, 1.0f}; kernel void test(global float* out) { *out = array[0]; }
kernel void AddSumsVec(global int8* buffer, global int* sums) { unsigned int globalId = get_global_id(0); int val = sums[get_group_id(0)]; buffer[globalId * 2 + 0] += val; buffer[globalId * 2 + 1] += val; }
kernel void subtract_diff(global unsigned int* tally, global unsigned int* tallyCount, global unsigned int* tallyBuffer, global unsigned int* g_queryCt, unsigned int segmentSize, unsigned int segmentSizePow2, unsigned int _segmentSizeModulor, unsigned int _segmentSizeBitShiftDivisor) { unsigned int gIdx = get_global_...
kernel void soma(global float* E, local float* EP) { int next_power_of_2 = (int)pown((float)2.0, (int)ceil(log2((float)get_local_size(0)))); int lo_id = get_local_id(0); int gr_id = get_group_id(0); int s = next_power_of_2 / 2; EP[lo_id] = E[lo_id]; EP[lo_id + s] = E[lo_id + s]; for (; s > 0; s /= 2) {...
kernel void scan_add(global const int* A, global int* B, local int* scratch_1, local int* scratch_2) { int id = get_global_id(0); int lid = get_local_id(0); int N = get_local_size(0); local int* scratch_3; scratch_1[lid] = A[id]; barrier(0x01); for (int i = 1; i < N; i *= 2) { if (lid >= i) s...
kernel void foo(global uchar* retval) { int gid = get_global_id(0); if (gid > 0) goto foobar; retval[gid] = 0; return; foobar: retval[gid] = 1; }
kernel void relational_greater_than_or_equal_to_float16float16(global float16* src_0, global float16* src_1, global int16* dst) { int gid = get_global_id(0); dst[gid] = (int16)(src_0[gid] >= src_1[gid]); }