kernel_code
stringlengths
49
1.22M
kernel void compiler_half_to_double(global float* src, global double* dst) { int i = get_global_id(0); dst[i] = src[i]; }
kernel void swapDimensionsBwd(global float* dataIn, global float* dataOut, unsigned int const dim1, unsigned int const dim2, unsigned int const dim3) { unsigned int idx = get_global_id(0); unsigned int dim1dim2 = mul24(dim1, dim2); unsigned int dim3dim2 = mul24(dim3, dim2); unsigned int inX = idx % dim1; un...
kernel void bench_workgroup_reduce_add_long(global long* src, global long* dst, int reduce_loop) { long val; long result; for (; reduce_loop > 0; reduce_loop--) { val = src[get_global_id(0)]; result = work_group_reduce_add(val); } dst[get_global_id(0)] = result; }
kernel void prefixSum(global int* restrict output, global int* restrict input, const unsigned int in_size) { int2 tmp_buff; tmp_buff.s0 = 0; int size = in_size / 2; for (int i = 0; i < size; i++) { int2 in = ((global int2*)input)[i]; tmp_buff.s1 = tmp_buff.s0 + in.s0; ((global int2*)output)[i] = tmp...
kernel void copyNPaste(global float* in, global float8* out) { size_t id = get_global_id(0); size_t index = id * sizeof(float8); float8 t = vload8(index, in); out[index].s0 = t.s0; out[index].s1 = t.s1; out[index].s2 = t.s2; out[index].s3 = t.s3; out[index].s4 = t.s4; out[index].s5 = t.s5; out[index...
kernel void mutate(global const uchar* const a, global unsigned int* const b, const unsigned int n) { const size_t gid = get_global_id(0); if (gid < n) b[gid] = a[gid]; }
kernel void fractionize(global double* output, global double* input) { unsigned int tid = get_global_id(0); if (tid == 0) output[tid] = input[tid] / (double)((1 << 22) - 1) * 100; }
kernel void test_arg_2_4_kern(global float4* a0, global float4* a1, global float4* b0, global float4* b1, global float4* b2, global float4* b3) { float4 za = (float4)(0.75f, 0.5f, 0.25f, 0.33f); unsigned int gtid = get_global_id(0); float4 tmp0 = a0[gtid] + 0.1f + za; float4 tmp1 = a1[gtid] + 1.1f + za; b0[gt...
kernel void Cast(global float* out, global const int* input, const int num_threads) { int tid = get_global_id(0); if (tid < num_threads) out[tid] = (float)(input[tid]); }
kernel void kernel_doTinyTask(int a, int b, global float* result) { int sum = a + b; int threadID = get_local_id(0); if (threadID >= 1024) *result = sum; }
int f(private int x) { int g = (1 + x); return g; } kernel void brahmaKernel(global int* buf) { buf[0] = f(1); }
kernel void kernel_lgamma_withDD1(global float* result_lgamma, int N) { float t1 = 0.2; int i = 0; for (i = 0; i < N; i++) { t1 = lgamma(t1) - 1.3; t1 = lgamma(t1) - 1.3; t1 = lgamma(t1) - 1.3; t1 = lgamma(t1) - 1.3; t1 = lgamma(t1) - 1.3; t1 = lgamma(t1) - 1.3; t1 = lgamma(t1) - 1.3;...
kernel void isnormal_float8(global float8* src_0, global int8* dst) { int gid = get_global_id(0); dst[gid] = (int8)(isnormal(src_0[gid])); }
kernel void kernel_expm1_withDD1(global float* result_expm1, int N) { float t1 = 0.0; int i = 0; for (i = 0; i < 10 * N; i++) { t1 = expm1(t1) - 1.0; t1 = expm1(t1) - 1.0; t1 = expm1(t1) - 1.0; t1 = expm1(t1) - 1.0; t1 = expm1(t1) - 1.0; t1 = expm1(t1) - 1.0; t1 = expm1(t1) - 1.0; ...
kernel void access2darray(global float* array, global float* out, const int row_to_access, const int nrows, const int ncols) { global float* row = &array[row_to_access * ncols]; for (int i = 0; i < ncols; i++) { out[i] = row[i]; } }
kernel void min_max_kernel(global const float* input, global float2* subImg, const unsigned int divider) { const unsigned int idx = get_global_id(0); const unsigned int first_idx_in = idx * divider; float local_arr[128]; int j = 0; for (int i = first_idx_in; i < (first_idx_in + divider); i++) { local_a...
kernel void compiler_workgroup_broadcast_1D_int(global int* src, global int* dst, unsigned int wg_local_x, unsigned int wg_local_y, unsigned int wg_local_z) { unsigned int offset = 0; unsigned int index = offset + get_global_id(0); int val = src[index]; int broadcast_val = work_group_broadcast(val, wg_local_x)...
kernel void do_clustering(int num_of_clusters, int num_of_points, global float* centers_x, global float* centers_y, global float* points_x, global float* points_y, global int* point_cluster_ids) { int global_id = get_global_id(0); if (global_id >= num_of_points) { return; } int point_cluster_id = point_clu...
float boundRange(float x, float lowerLimit, float upperLimit) { return (x < lowerLimit ? lowerLimit : (x > upperLimit ? upperLimit : x)); } float Logistic_fn(float x) { if (x < 88.722839f) { if (x > -88.722839f) return (float)1.0 / ((float)1.0 + exp(-x)); else return 0; } return 1; } floa...
kernel void util_create_sequence(global unsigned long* output_buffer, unsigned long begin, unsigned long num_elements) { size_t tid = get_global_id(0); if (tid < num_elements) { output_buffer[tid] = begin + tid; } }
float calc(int idx, int xx, int yy) { const int j = idx / xx; const int i = idx % xx; float ei = i / (float)xx; float ej = j / (float)yy; if (ei > 0.5) ei = 1.0 - ei; if (ej > 0.5) ej = 1.0 - ej; return ei * ei + ej * ej; } kernel void applyPhsFilter(global float* mid, int xx, int yy, float d2b) ...
kernel void preinc(global uchar* out, uchar in) { out[0] = ++in; }
struct stable_info { double k1; double theta0; double alfa; double alfainvalfa1; double mu_0; double sigma; double xi; double xxi_th; double c2_part; double c1; double THETA_TH; double beta; double xi_coef; short is_xxi_negative; unsigned int integrand; double final_pdf_factor; double ...
kernel void mysql_old_markov(global uint2* dst, uint4 input, unsigned int size, uint16 chbase, global unsigned int* found_ind, global unsigned int* bitmaps, global unsigned int* found, global unsigned int* table, uint4 singlehash) { unsigned int l; unsigned int i, ib, ic, id, b1, b2, b3; unsigned int mOne, chbase...
inline ulong boost_popcount(const ulong x) { ulong count = 0; for (ulong i = 0; i < sizeof(i) * 8; i++) { if (x & (ulong)1 << i) { count++; } } return count; } kernel void copy(global int* _buf0, global ulong* _buf1, const unsigned int count) { unsigned int index = get_local_id(0) + (32 * get_g...
kernel void test_uchar8(global uchar* pin, global uchar* pout) { int x = get_global_id(0); uchar8 value; value = vload8(x, pin); value += (uchar8){(uchar)1, (uchar)2, (uchar)3, (uchar)4, (uchar)5, (uchar)6, (uchar)7, (uchar)8}; vstore8(value, x, pout); }
kernel void reduce(global uint4* input, global uint4* output, local uint4* sdata) { unsigned int tid = get_local_id(0); unsigned int bid = get_group_id(0); unsigned int gid = get_global_id(0); unsigned int localSize = get_local_size(0); unsigned int stride = gid * 2; sdata[tid] = input[stride] + input[stri...
kernel void test_short(global short* src, global short* dst) { int i = get_global_id(0); dst[i] = popcount(src[i]); }
kernel void and (global int* out, float a, float b) { out[0] = a && b; }
kernel void SAXPY(global const float* restrict x, global float* restrict y, const int a, const int size) { for (int i = 0; i < size; i += 1024) { float local_x[1024]; float local_y[1024]; __attribute__((opencl_unroll_hint(16))) for (int j = 0; j < 1024; j++) { local_x[j] = x[i + j]; } __attr...
inline long indexFromImagePosition(int2 imgpos, unsigned int width, unsigned int height, unsigned int buckets, unsigned int currentBucket) { return currentBucket + (imgpos.x * buckets) + (imgpos.y * width * buckets); } kernel void mergeImages(global uchar* input, global uchar* output, unsigned int width, unsigned in...
unsigned int div_up(unsigned int a, unsigned int b) { return (a + b - 1) / b; } unsigned int round_mul_up(unsigned int a, unsigned int b) { return div_up(a, b) * b; } int scan_pass(int gi, int nels, global int* restrict out, global const int* restrict in, local int* restrict lmem, int corr) { const unsigned int...
kernel void kernel_sin_withDD2(global float* result_sin, int N) { float t1 = 1.0; float2 t2 = t1 + (float2)(0, 0.1); int i = 0; for (i = 0; i < N; i++) { t2 = sin(t2); t2 = sin(t2); t2 = sin(t2); t2 = sin(t2); t2 = sin(t2); t2 = sin(t2); t2 = sin(t2); t2 = sin(t2); t2 = sin(t...
kernel void Concat_normal_V(const int nthreads, global const float4* in_data, const int num_concats, const int concat_size, const int top_concat_axis, const int bottom_concat_axis, const int offset_concat_axis, global float4* out_data) { int index = get_global_id(0); if (index < (nthreads / 4)) { const int tot...
int posToRow(int pos) { return (pos >> 10) & ((1 << 10) - 1); } int posToCol(int pos) { return pos & ((1 << 10) - 1); } int rowColToPos(int row, int col) { return (row << 10) | col; } int linearIdToPos(int linearId, int base) { return rowColToPos((linearId / base), (linearId % base)); } int posToOffset(int pos,...
kernel void array_rmsprop_f32(global float* x, global float* dx, global float* cache, float learn_rate, float decay_rate, float eps) { unsigned int i = get_global_id(0); cache[i] = decay_rate * cache[i] + (1.f - decay_rate) * dx[i] * dx[i]; x[i] += learn_rate * dx[i] / (sqrt(cache[i]) + eps); }
int whoHasWon(global const float* ballPosX, global const int* ballRad, global const int* width, global const float* ballVelX) { if (*ballPosX + *ballRad >= *width && *ballVelX > 0) return -1; else if (*ballPosX <= 0 && *ballVelX < 0) return 1; else return 0; } void reset(global float* ballPosX, globa...
kernel void reduceReal4Buffer(global float4* restrict buffer, int bufferSize, int numBuffers) { int index = get_global_id(0); int totalSize = bufferSize * numBuffers; while (index < bufferSize) { float4 sum = buffer[index]; for (int i = index + bufferSize; i < totalSize; i += bufferSize) sum += buff...
typedef enum { LOGISTIC, RELU, RELIE, LINEAR, RAMP, TANH, PLSE, LEAKY, ELU, LOGGY, STAIR, HARDTAN, LHTAN } ACTIVATION; kernel void image2columarray1x1(int n, global float* data_im, int height, int width, int ksize, const int pad, int stride, int height_col, int width_col, global float* data_col) { int index = get_gl...
kernel void foo(global uchar4* IN, global float4* OUT) { uchar4 in4 = *IN; float4 result; result.x = in4.x; result.y = in4.y; result.z = in4.z; result.w = in4.w; *OUT = result; }
kernel void test_fa1_4_3_kern(global float* a0, global float* a1, global float* a2, global float* a3, global float* b0, global float* b1, global float* b2) { unsigned int gtid = get_global_id(0); float tmp0 = a0[gtid] + 0.1f; float tmp1 = a1[gtid] + 1.1f; float tmp2 = a2[gtid] + 2.1f; float tmp3 = a3[gtid] + ...
kernel void test_simple_if_else(global int* out, global const int* in, global const int* cond) { unsigned int gid = get_global_id(0); int val = in[gid]; if (cond[gid] > 42) { out[gid] = val; } else { out[gid] = -val; } }
kernel void pi_vec8(const int niters, const float step_size, local float* local_sums, global float* partial_sums) { int num_wrk_items = get_local_size(0); int local_id = get_local_id(0); int group_id = get_group_id(0); float sum, accum = 0.0f; float8 x, psum_vec; float8 ramp = {0.5f, 1.5f, 2.5f, 3.5f, 4.5f...
kernel void test_upsample(global long* out, int a) { *out = upsample(a, (unsigned int)42); }
struct S0 { uchar a; ulong b[2][3][1]; }; kernel void multidim_array_in_struct(global ulong* output) { struct S0 s = { 1UL, {{{1L}, {1L}, {1L}}, {{1L}, {1L}, {1L}}}, }; ulong c = 0UL; for (int i = 0; i < 2; i++) for (int j = 0; j < 3; j++) for (int k = 0; k < 1; k++) c += s.b...
kernel void compiler_half_basic(global float* src, global float* dst) { int i = get_global_id(0); float hf = 2.5; float val = src[i]; val = val + hf; val = val * val; val = val / (float)1.8; dst[i] = val; }
float boundRange(float x, float lowerLimit, float upperLimit) { return (x < lowerLimit ? lowerLimit : (x > upperLimit ? upperLimit : x)); } float Logistic_fn(float x) { if (x < 88.722839f) { if (x > -88.722839f) return (float)1.0 / ((float)1.0 + exp(-x)); else return 0; } return 1; } floa...
kernel void copy2(global short* _buf0, const unsigned int count) { unsigned int index = get_local_id(0) + (48 * get_group_id(0)); for (unsigned int i = 0; i < 4; i++) { if (index < count) { _buf0[index] = clamp(_buf0[index], (short)(4), (short)(6)); index += 12; } } }
kernel void scale_f(global float* output, const float multiplier, const unsigned int size) { unsigned int tid = get_global_id(0); if (tid < size) output[tid] = output[tid] * multiplier; }
constant int outVal = 42; constant int outIndex = 7; constant int outValues[16] = {17, 01, 11, 12, 1955, 11, 5, 1985, 113, 1, 24, 1984, 7, 23, 1979, 97}; kernel void constant_kernel(global int* out) { int tid = get_global_id(0); if (tid == 0) { out[0] = outVal; out[1] = outValues[outIndex]; } else { ...
kernel void update_velocities(const unsigned int N, const float dt, const float particle_mass, global float* vx, global float* vy, global float* vz, global float* fx, global float* fy, global float* fz, global float* ofx, global float* ofy, global float* ofz) { const int globalid = get_global_id(0); if (globalid >=...
kernel void gegl_opacity_RaGaBaA_float(global const float4* in, global const float* aux, global float4* out, float value) { int gid = get_global_id(0); float4 in_v = in[gid]; float aux_v = (aux) ? aux[gid] : 1.0f; float4 out_v; out_v = in_v * aux_v * value; out[gid] = out_v; }
kernel void test_clamp(global unsigned int* out, global unsigned int* in) { *out = clamp(*in, (unsigned int)7, (unsigned int)42); }
kernel void multiply_ulong16ulong16(global ulong16* src_0, global ulong16* src_1, global ulong16* dst) { int gid = get_global_id(0); dst[gid] = src_0[gid] * src_1[gid]; }
kernel void MatVecMulCoalesced0(const global float* M, const global float* V, unsigned int width, unsigned int height, global float* W, local float* partialDotProduct) { for (unsigned int y = get_group_id(0); y < height; y += get_num_groups(0)) { const global float* row = M + y * width; float sum = 0; fo...
kernel void copy(global float* input, global float* output, const unsigned int count) { int i = get_global_id(0); if (i < count) output[i] = input[i]; }
kernel void abs_uint(global unsigned int* src_0, global unsigned int* dst) { int gid = get_global_id(0); dst[gid] = abs(src_0[gid]); }
kernel void kernel1(global int* x, global int* y, int z) { x[get_global_id(0)] = y[get_global_id(0)] * z; }
kernel void StatefulCopyBuffer(const global uchar* src, global uchar* dst) { unsigned int id = get_global_id(0); dst[id] = src[id]; }
float r4_uni(global unsigned int* jsr) { unsigned int jsr_input; float value; jsr_input = *jsr; *jsr = (*jsr ^ (*jsr << 13)); *jsr = (*jsr ^ (*jsr >> 17)); *jsr = (*jsr ^ (*jsr << 5)); value = fmod(0.5 + (float)(jsr_input + *jsr) / 65536.0 / 65536.0, 1.0); return value; } unsigned int shr3_seeded(g...
kernel void kernel7_readwrite(global char* ptr, unsigned long memsize, volatile global unsigned int* err_count, global unsigned long* err_addr, global unsigned long* err_expect, global unsigned long* err_current, global unsigned long* err_second_read) { int i; global unsigned long* buf = (global unsigned long*)ptr;...
kernel void test_template_empty0(global int const* const input, global int* const output) { __asm__(""); output[get_global_id(0)] = 0; }
kernel void SetNum(global float4* set, float num) { set[get_global_id(0)].xyzw = num; }
kernel void vectkernel(global float* a, global float* b, global float* c) { int i = get_global_id(0); c[i] = 4.f * a[i] + b[i]; }
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 Srotmg_naive(global float* d1, global float* d2, global float* b1, float bb2, global float* result) { float dd1 = *d1; float dd2 = *d2; float bb1 = *b1; float p1 = dd1 * bb1; float p2 = dd2 * bb2; float q1 = p1 * bb1; float q2 = p2 * bb2; float h11; float h12; float h21; float h22; ...
kernel void scan_L1_kernel(unsigned int n, global unsigned int* dataBase, unsigned int data_offset, global unsigned int* interBase, unsigned int inter_offset) { local unsigned int s_data[(1024 + (1024 >> 4) + (1024 >> (2 * 4)))]; global unsigned int* data = dataBase + data_offset; global unsigned int* inter = in...
kernel void loop1(global float* a) { int id = get_local_id(0); a[id] = a[id] * 2; }
kernel void async_copy(global int* data, local int* scratch) { event_t event = async_work_group_copy(scratch, data, get_local_size(0), 0); wait_group_events(1, &event); int i = get_local_id(0); data[get_local_size(0) - i - 1] = scratch[i]; }
kernel void transpose(global float* output, global float* input, int r, int c, int ldout, int ldin) { int idx = get_global_id(0); int row = idx % ldin; int col = idx / ldin; if (row >= r || col >= c) return; output[col + row * ldout] = input[idx]; }
kernel void ScanBlocksOptim(global int* buffer, global int* sums, local int* shared) { unsigned int globalId = get_global_id(0) + get_group_id(0) * get_local_size(0); unsigned int localId = get_local_id(0); unsigned int n = get_local_size(0) * 2; unsigned int offset = 1; unsigned int ai = localId; unsigne...
kernel void div_f64(unsigned int length, global double* a, global double* b, global double* out) { const unsigned int id = get_global_id(0); if (id < length) { out[id] = a[id] / b[id]; } }
kernel void hsv2rgb_pln(global const double* input, global unsigned char* output, const unsigned int height, const unsigned int width) { int pixIdx = get_global_id(0); double hh, p, q, t, ff; int i; double h, s, v; pixIdx = 3 * pixIdx; if (pixIdx < height * width) { h = input[pixIdx]; s = input[pix...
kernel void test_rotate(global unsigned int* out, unsigned int a, unsigned int b) { *out = rotate(a, b); }
kernel void trans_unit_lu_forward(global const unsigned int* row_indices, global const unsigned int* column_indices, global const float* elements, global float* vector, unsigned int size) { local unsigned int row_index_lookahead[256]; local unsigned int row_index_buffer[256]; unsigned int row_index; unsigned i...
kernel void pre_decrement_ushort4(global ushort4* src_0, global ushort4* dst) { int gid = get_global_id(0); dst[gid] = --src_0[gid]; }
float metric(int x1, int y1, int x2, int y2) { float x = x1 - x2; float y = y1 - y2; return x * x + y * y; } kernel void JFA(global const unsigned int* M_g, global const unsigned int* P1_g, global const unsigned int* P2_g, global unsigned int* M_o, global unsigned int* P1_o, global unsigned int* P2_o, int X_size...
kernel void axpy_float(const int n, const float alpha, global const float* x, const int offx, global float* y, const int offy) { for (int index = get_global_id(0); index < n; index += get_global_size(0)) { float src = x[offx + index]; float dst = y[offy + index]; y[offy + index] = alpha * src + dst; } }
kernel void scanhistograms(global int* histo, local int* temp, global int* globsum) { int it = get_local_id(0); int ig = get_global_id(0); int decale = 1; int n = get_local_size(0) << 1; int gr = get_group_id(0); temp[(it << 1)] = histo[(ig << 1)]; temp[(it << 1) + 1] = histo[(ig << 1) + 1]; for (int ...
kernel void clz_ulong16(global ulong16* src_0, global ulong16* dst) { int gid = get_global_id(0); dst[gid] = clz(src_0[gid]); }
kernel void vecsmooth(global int* restrict s, global const int* restrict v, int nels) { const int i = get_global_id(0); if (i >= nels) return; int v1 = 0, v2 = v[i], v3 = 0; int c = 1; if (i > 0) { v1 = v[i - 1]; ++c; } if (i + 1 < nels) { v3 = v[i + 1]; ++c; } s[i] = (v1 + v2 + v3...
kernel void brahmaKernel(global int* buf) { if ((0 == 2)) { buf[0] = 1; } else { buf[0] = 2; }; }
kernel void reduceViaScratch_noif(global float* inout, local float* scratch) { int localId = get_local_id(0); int workgroupSize = get_local_size(0); scratch[localId] = inout[localId]; for (int offset = (workgroupSize >> 1); offset > 0; offset >>= 1) { scratch[localId] = localId < offset ? scratch[localId] ...
kernel void sum(global int* bitsum, int n, int start, int log_stride, int length) { int i = (get_global_id(0) << log_stride) + start; int j = i + length; if (j < n) bitsum[j] += bitsum[i]; }
kernel void convert_heads(global const unsigned int* restrict in, global unsigned int* restrict out, const unsigned int len) { const unsigned int thread = get_global_id(0); const unsigned int even = 2 * thread; const unsigned int odd = 2 * thread + 1; if (even < len) out[even] = (even == len - 1) ? 1 : in[e...
constant float4 gravity = (float4)(0, 0, -10, 0); kernel void integrate1Euler(float dt, global float* invmass_in, global float4* velocity_in, global float4* force_in, global float4* velocity_out) { int id = get_global_id(0); velocity_out[id] = velocity_in[id] + dt * force_in[id] * invmass_in[id]; }
kernel void dot_product(global float4* a_vec, global float4* b_vec, global float* output, local float4* partial_dot) { int gid = get_global_id(0); int lid = get_local_id(0); int group_size = get_local_size(0); partial_dot[lid] = a_vec[gid] * b_vec[gid]; barrier(0x01); for (int i = group_size / 2; i > 0; i...
kernel void f0(global unsigned int dest[]) { dest[0] = 0; }
kernel void bitselect_ushort4ushort4ushort4(global ushort4* src_0, global ushort4* src_1, global ushort4* src_2, global ushort4* dst) { int gid = get_global_id(0); dst[gid] = bitselect(src_0[gid], src_1[gid], src_2[gid]); }
kernel void FillBufferSSHOffset(global uchar* ptr, unsigned int dstSshOffset, const global uchar* pPattern, unsigned int patternSshOffset) { unsigned int dstIndex = get_global_id(0); unsigned int srcIndex = get_local_id(0); global uchar* pDst = (global uchar*)ptr + dstSshOffset; global uchar* pSrc = (global uch...
kernel void test_xor_full(global const unsigned int* a, global const unsigned int* b, global unsigned int* c, unsigned int d) { int gid = get_global_id(0); c[gid] = a[gid] ^ b[gid] ^ d; }
kernel void amdPadFFTBlock(global const float* in, global float* out, int inOffset, int inLength, int outOffset, int outLength, int blockLength, int padLength) { int glbl_id = get_global_id(0); int blockNumber = (glbl_id) / (blockLength + padLength); int inIndex = ((glbl_id + inOffset - blockNumber * padLength) ...
kernel void stream(global const float* a, global float* b, int n) { b[get_global_id(0)] = a[get_global_id(0)]; }
kernel void test_block_2_4_kern(global int* a0, global int* a1, global int* b0, global int* b1, global int* b2, global int* b3, local int* c0, local int* c1) { 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] + 0; c1[ltid] ...
int get_incorrectly_indexed_value(const int triple[6], int index); void set_incorrectly_indexed_value(global int* array, int index, int value); int get_incorrectly_indexed_value(const int triple[6], int index) { const int sum1 = triple[0] + triple[1] + triple[2]; const int sum2 = triple[3] + triple[4] + triple[5]; ...
kernel void kernel_covariance(int m, int n, float float_n, global float* restrict data, global float* restrict symmat, global float* restrict mean) { int i, j, j1, j2; for (j = 0; j < m; j++) { mean[j] = 0.0; for (i = 0; i < n; i++) mean[j] += data[i * n + j]; mean[j] /= float_n; } for (i = ...
kernel void simplex_3d(global const int* level_count, global const double* levels, global const double* location, global double* res) { res[0] = 0.0; }
kernel void builtin_mad_sat(global short* src1, global short* src2, global short* src3, global short* dst) { short i = get_global_id(0); dst[i] = mad_sat(src1[i], src2[i], src3[i]); }
kernel void DecodeBBoxesCENTER_SIZE(const int nthreads, global const float* loc_data, global const float* prior_data, const int variance_encoded_in_target, const int num_priors, const int share_location, const int num_loc_classes, const int background_label_id, const int clip_bbox, const int locPredTransposed, global f...
kernel void test_rotate(global ulong4* out, ulong4 a, ulong4 b) { *out = rotate(a, b); }