kernel_code stringlengths 49 1.22M |
|---|
kernel void relational_less_than_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]);
} |
inline unsigned int offsetSynapses(unsigned int networkId, unsigned int neuronId, unsigned int inNeurons, unsigned int outNeurons) {
return (networkId * inNeurons * outNeurons) + (neuronId * inNeurons);
}
inline unsigned int offsetNeurons(unsigned int networkId, unsigned int neuronId, unsigned int neurons) {
return... |
kernel void builtin_wrappers(global char* output, global float* f, global double* d) {
local int offset;
offset = 0;
vload2(offset, f);
vload4(offset, f);
vload8(offset, f);
vload16(offset, f);
vstore2((float2)(0, 0), offset, f);
vstore4((float4)(0, 0, 0, 0), offset, f);
vstore8((float8)(0, 0, ... |
kernel void square(global int* buffer) {
size_t id = get_global_id(0);
buffer[id] = buffer[id] * buffer[id];
} |
__attribute__((work_group_size_hint(256, 1, 1))) __attribute__((work_group_size_hint(256, 1, 1))) __attribute__((work_group_size_hint(256, 1, 1))) __attribute__((work_group_size_hint(256, 1, 1))) __attribute__((work_group_size_hint(256, 1, 1))) __attribute__((work_group_size_hint(256, 1, 1))) __attribute__((work_group_... |
kernel void builtin_num_groups(global int* ret, global int* i_dim) {
*ret = get_num_groups(*i_dim);
} |
kernel void StrLenGpuKernel(global char* _Dict, global char* Lengths) {
int dictSize = 796032;
int x = get_global_id(0);
global char* w = _Dict + x;
int i = 0;
int j = 0;
while (w[j] != '\0') {
i++;
j += dictSize;
}
Lengths[x] = i;
} |
kernel void calculate_weights(global float* X, global char* Y, global float* W, global char* misclassified, int x_length, int x_dim, float eta) {
int worker_id = get_global_id(0);
local float block_weights[500][6];
int i, j;
if (misclassified[worker_id] == 1) {
for (j = 0; j < x_dim; j++) {
block_weig... |
kernel void rotate_long8long8(global long8* src_0, global long8* src_1, global long8* dst) {
int gid = get_global_id(0);
dst[gid] = rotate(src_0[gid], src_1[gid]);
} |
kernel void adjacent_difference(global int* _buf0, global int* _buf1) {
const unsigned int i = get_global_id(0);
if (i == 0) {
_buf0[0] = _buf1[0];
} else {
_buf0[i] = ((_buf1[i]) - (_buf1[i - 1]));
}
} |
kernel void isnotequal_float8float8(global float8* src_0, global float8* src_1, global int8* dst) {
int gid = get_global_id(0);
dst[gid] = (int8)(isnotequal(src_0[gid], src_1[gid]));
} |
kernel void add(global long* out, long a, long b) {
out[0] = a + b;
} |
kernel void radix_sort8(global ushort8* global_data) {
typedef union {
ushort8 vec;
ushort array[8];
} vec_array;
unsigned int one_count, zero_count;
unsigned int cmp_value = 1;
vec_array mask, ones, data;
data.vec = global_data[0];
for (int i = 0; i < 3; i++) {
zero_count = 0;
one_coun... |
kernel void myKernel(global int* wy, int tabSize) {
int id = get_global_id(0);
if (id > tabSize)
return;
wy[id] = id;
} |
kernel void kernel_15(global float* inputA, global float* inputB, global float* output, const unsigned int count) {
float A = 0;
for (int i = 0; i < count; i++) {
A += inputA[i] * log(2 * inputA[i] / (inputA[i] + inputB[i]));
}
output[15] = A;
} |
kernel void cck_dummy(const int numElems, global float* srcDst) {
unsigned int gid = get_global_id(0);
if (gid < numElems)
for (int i = 0; i < 65536; ++i) {
srcDst[gid] *= 1.0f;
srcDst[gid] += 1.0f;
srcDst[gid] /= 1.0f;
}
} |
kernel void DistanceTransform(global const float* vIn, global float* vOut, int iDx, int iDy) {
int iGID = get_global_id(0);
if (iGID >= (iDx * iDy)) {
return;
}
float minVal = 0x1.fffffep127f;
for (int y = 0; y < iDy; y++) {
for (int x = 0; x < iDx; x++) {
if (vIn[y * iDy + x] >= 1.0f) {
... |
kernel void sum_byte(global char* in, global char* out, unsigned int reduce_factor) {
int x = get_global_id(0);
int size0 = get_global_size(0);
unsigned int begin = x;
int i = 0;
int sum = 0;
do {
sum += in[begin];
i++;
begin += size0;
} while (i != reduce_factor);
out[x] = sum;
} |
kernel void add_longlong(global long* src_0, global long* src_1, global long* dst) {
int gid = get_global_id(0);
dst[gid] = src_0[gid] + src_1[gid];
} |
kernel void test_arg_5_1_kern(global int* a0, global int* a1, global int* a2, global int* a3, global int* a4, global int* b0) {
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] + 3;
int tmp4 = a4[gtid] + 4;
b0[gtid] = (0 +... |
kernel void pre_decrement_int8(global int8* src_0, global int8* dst) {
int gid = get_global_id(0);
dst[gid] = --src_0[gid];
} |
kernel void intragroup_hidden_race(global int* data, global int* output) {
int id = get_local_id(0);
output[id] = data[0];
barrier(0x01);
if (id == 0) {
data[0] = -1;
}
} |
kernel void compiler_bitcast_long_to_int2(global ulong* src, global uint2* dst) {
int tid = get_global_id(0);
ulong v = src[tid];
uint2 dl = __builtin_astype((v), uint2);
dst[tid] = dl;
} |
kernel void abs_long2(global long2* src_0, global ulong2* dst) {
int gid = get_global_id(0);
dst[gid] = (ulong2)(abs(src_0[gid]));
} |
kernel void Roi_pool(global float* out_data, global float* out_index, global const float* in_data, global const float* in_rois, const int in_n_stride, const int in_c_stride, const int in_h_stride, const int in_w_stride, const int out_n_stride, const int out_c_stride, const int out_h_stride, const int out_w_stride, cons... |
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 parallelReduction(global float* data, local float* addition_array, unsigned int read_size, unsigned int read_offset, unsigned int write_offset) {
int N = get_local_size(0);
if (get_global_id(0) < read_size) {
addition_array[get_local_id(0)] = data[get_global_id(0) + read_offset];
} else {
add... |
kernel void relational_less_than_or_equal_to_uint16uint16(global uint16* src_0, global uint16* src_1, global int16* dst) {
int gid = get_global_id(0);
dst[gid] = (int16)(src_0[gid] <= src_1[gid]);
} |
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
kernel void builtin_convert_float_to_uchar_sat(global float* src, global uchar* dst) {
int i = get_global_id(0);
dst[i] = convert_uchar_sat(src[i]);
} |
kernel void TestLinearAccess(global float* input, global float* output) {
int gid = get_global_id(0);
int lid = get_local_id(0);
int bid = get_group_id(0);
int gsize = get_global_size(0);
int lsize = get_local_size(0);
int inidx = gid;
int outidx = lid + bid * lsize;
output[outidx] = input[inidx];
} |
kernel void test_dot(const global float* x, const global float* y, global float* out) {
unsigned int gid = get_global_id(0);
vstore3(dot(vload3(gid, x), vload3(gid, y)), gid, out);
} |
float cross2d(float2 a, float2 b) {
return a.x * b.y - a.y * b.x;
}
float dot2d(float2 a, float2 b) {
return a.x * b.x + a.y * b.y;
}
float2 perp(float2 a) {
return (float2)(-a.y, a.x);
}
float2 rotate2d(float orientation, float2 input) {
float cs = cos(radians(orientation));
float sn = sin(radians(orienta... |
kernel void lt(global int* out, char a, char b) {
out[0] = a < b;
} |
kernel void square(global float* input, global float* output, int n) {
int i = get_global_id(0);
if ((i >= 0) && (i < n)) {
output[i] = input[i] * input[i];
}
} |
int cellId(int4 cellFactors_, unsigned int gridCellsX, unsigned int gridCellsY, unsigned int gridCellsZ) {
int cellId_ = cellFactors_.x + cellFactors_.y * gridCellsX + cellFactors_.z * gridCellsX * gridCellsY;
return cellId_;
}
int4 cellFactors(float4 position, float xmin, float ymin, float zmin, float hashGridCel... |
kernel void iplayer(const global float* pInput, const global float* pWeights, global float* pOutput, const int nInputs, const global float* pBias) {
const int x = get_global_id(0);
const int idxstart = x * nInputs;
float sum = 0;
for (int i = 0; i < nInputs; i++) {
sum += pWeights[idxstart + i] * pInput[i];... |
kernel void rotate_char16char16(global char16* src_0, global char16* src_1, global char16* dst) {
int gid = get_global_id(0);
dst[gid] = rotate(src_0[gid], src_1[gid]);
} |
int bar(global int* x) {
return x[0];
}
kernel void foo2(global int* x, global int* y) {
int z = bar(x);
barrier(0x02);
y[0] = z;
} |
kernel void dfun(global float* state, global float* coupling, global float* param, global float* deriv) {
int i = get_global_id(0), n = get_global_size(0);
float V = state[i * 2], W = state[i * 2 + 1];
float c_0 = coupling[i];
float tau = param[n + i], a = param[2 * n + i], b = param[3 * n + i], c = param[4 *... |
kernel void array_tanh_f32(global float* a, global float* b) {
unsigned int i = get_global_id(0);
b[i] = tanh(a[i]);
} |
kernel void iif_binid(unsigned int image_width, unsigned int image_height, uchar nbins, global float* image, global float* output_binid) {
size_t gid = get_global_id(0);
float intensity = image[gid];
uchar bin_number = floor(intensity * nbins);
for (size_t b = 0; b < nbins; b++) {
output_binid[((b) + ((((... |
int maximum(int a, int b, int c) {
int k;
if (a <= b)
k = b;
else
k = a;
if (k <= c)
return (c);
else
return (k);
}
kernel void dummy_kernel_gpu(global int* tmp_var) {
int tx = get_global_id(0);
if (tx == 0)
*tmp_var = *tmp_var + 1;
} |
kernel void prefixSum(global int* restrict output, global int* restrict input, const unsigned int in_size) {
int4 tmp_buff;
tmp_buff.s0 = 0;
int size = in_size / 4;
for (int i = 0; i < size; i++) {
int4 in = ((global int4*)input)[i];
tmp_buff.s1 = tmp_buff.s0 + in.s0;
tmp_buff.s2 = tmp_buff.s1 + in.... |
kernel void bitselect_ulongulongulong(global ulong* src_0, global ulong* src_1, global ulong* src_2, global ulong* dst) {
int gid = get_global_id(0);
dst[gid] = bitselect(src_0[gid], src_1[gid], src_2[gid]);
} |
kernel void f_local_id(global unsigned int dest[]) {
const size_t i = get_local_id(0);
dest[i] = i;
} |
kernel void kernel_log_withoutDD1(global float* result_log, int N) {
float t1 = 0.0;
float t2 = 0.0;
float t3 = t1;
float t4 = t3;
float t5 = t4;
float t6 = t5;
float t7 = t6;
float t8 = t7;
float t9 = t8;
float t10 = t9;
float t11 = 0.0;
float t12 = 0.0;
float i = 1.0;
float p = 256 * N;
... |
kernel void kernel__ExclusivePrefixScanSmall(global float* input, global float* output, local float* block, const unsigned int length) {
int tid = get_local_id(0);
int offset = 1;
block[2 * tid] = input[2 * tid];
block[2 * tid + 1] = input[2 * tid + 1];
for (int d = length >> 1; d > 0; d >>= 1) {
barri... |
kernel void test_arg_7_1_kern(global int4* a0, global int4* a1, global int4* a2, global int4* a3, global int4* a4, global int4* a5, global int4* a6, global int4* b0) {
int4 za = (int4)(0, 1, 2, 3);
unsigned int gtid = get_global_id(0);
int4 tmp0 = a0[gtid] + 0 + za;
int4 tmp1 = a1[gtid] + 1 + za;
int4 tmp2 = ... |
kernel void abs_diff_ushort16ushort16(global ushort16* src_0, global ushort16* src_1, global ushort16* dst) {
int gid = get_global_id(0);
dst[gid] = abs_diff(src_0[gid], src_1[gid]);
} |
kernel void test_local_arg_def(global int* a, int n, local int* tmp_sum, global int* sum) {
int tid = get_local_id(0);
int lsize = get_local_size(0);
int i;
tmp_sum[tid] = 0;
for (i = tid; i < n; i += lsize)
tmp_sum[tid] += a[i];
if (lsize == 1) {
if (tid == 0)
*sum = tmp_sum[0];
return;... |
;
;
;
;
;
;
;
;
;
kernel void compiler_half_math_sqrt(global float* src, global float* dst) {
int i = get_global_id(0);
dst[i] = sqrt(src[i]);
} |
typedef int2 int2;
kernel void Add(unsigned int size, global const float* x, global const float* y, global float* output) {
unsigned int base = get_local_id(0) + (get_global_id(0) - get_local_id(0)) * 10;
for (unsigned int i = 0; i < 10; i++) {
unsigned int index = base + i * get_local_size(0);
if (index < ... |
kernel void somekernel(global int* src, global int* dst) {
int id = get_global_id(0);
dst[id] = (int)pown((float)src[id], 4);
} |
kernel void VectorAdd(global const float8* a, global const float8* b, global float8* c, int numElements) {
int iGID = get_global_id(0);
if (iGID >= numElements)
return;
float8 aGID = a[iGID];
float8 bGID = b[iGID];
float8 result = aGID + bGID;
c[iGID] = result;
} |
kernel void cpu_inplace_mul_add(global float* vec1, global const float* float2, float factor, unsigned int size) {
for (unsigned int i = get_global_id(0); i < size; i += get_global_size(0))
vec1[i] += float2[i] * factor;
} |
kernel void isgreater_float16float16(global float16* src_0, global float16* src_1, global int16* dst) {
int gid = get_global_id(0);
dst[gid] = (int16)(isgreater(src_0[gid], src_1[gid]));
} |
kernel void generatefloat(global float* array) {
int i = get_global_id(0);
array[i] = (float)i;
} |
kernel void test_arg_5_3_kern(global float* a0, global float* a1, global float* a2, global float* a3, global float* a4, 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 ... |
kernel void vector_add(global const unsigned int* restrict x, global const unsigned int* restrict y, global unsigned int* restrict z) {
int index = get_global_id(0);
z[index] = x[index] + y[index];
} |
kernel void wideDataTransfer(global float* in, global float* out) {
size_t STRIDE_INDEX = 4;
size_t id = (get_group_id(0) * get_local_size(0) + get_local_id(0)) * STRIDE_INDEX;
size_t offsetA = id;
size_t offsetB = (id + 1);
size_t offsetC = (id + 2);
size_t offsetD = (id + 3);
float16 A = vload16(offset... |
kernel void test_load_double(global double* foo, global float* bar) {
foo[0] = __builtin_load_half(bar);
} |
void gauss_real(global double* a, global double* b, unsigned long k, unsigned long i, unsigned long col) {
if (isnotequal(a[i * col + k], 0.0)) {
double aa = a[k * col + k] / a[i * col + k], bb;
b[i * col + k] /= aa;
for (unsigned long j = k; j < col; j++) {
bb = a[i * col + j];
bb *= aa;
... |
kernel void ratt10_kernel(global const float* T, global float* RKLOW, float TCONV) {
const float TEMP = T[get_global_id(0)] * TCONV;
const float ALOGT = log(TEMP);
(RKLOW[(((1) - 1) * (4)) + (get_global_id(0))]) = exp(4.22794408e1f - 9.e-1f * ALOGT + ((8.55468335e2f) * (1.0f / (TEMP))));
(RKLOW[(((2) - 1) * (4... |
kernel void test_simple_if(global int* out, global const int* in, global const int* cond) {
unsigned int gid = get_global_id(0);
int val = in[gid];
int factor = 1;
if (cond[gid] > 42) {
val += 17;
factor = -3;
}
out[gid] = -val * factor;
} |
kernel void read_write_only_memory(global int* input, global int* output) {
int i = get_global_id(0);
output[i] += input[i];
} |
constant int2 offset2D[4] = {{0, 0}, {0, 1}, {1, 0}, {1, 1}};
constant int4 offset3D[8] = {{0, 0, 0, 0}, {1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}, {1, 0, 1, 0}, {1, 1, 1, 0}, {0, 1, 1, 0}, {1, 1, 0, 0}};
constant sampler_t sampler = 0 | 0 | 0x10;
kernel void reduce(global short* buffer, local short* minScratch, loca... |
kernel void sample_test(global float* src, global int* dst) {
int tid = get_global_id(0);
dst[tid] = (int)src[tid];
} |
kernel void decode_bbox_corner_size_variance_kernel(const global float* loc_data, const global float* prior_data, const int num_priors, const int share_location, const int num_loc_classes, const int background_label_id, global float* bbox_data) {
int index = get_global_id(0);
const int c = index % num_loc_classes;
... |
kernel void AddNum(global float* src, global float* dst, float num) {
dst[get_global_id(0)] = src[get_global_id(0)] + num;
} |
kernel void dotReducer(global double* input, global double* output) {
local double localResult[128];
unsigned int localId = get_local_id(0);
unsigned int globalID = get_global_id(0);
unsigned int s;
output[globalID] = 0.0;
localResult[localId] = input[globalID];
barrier(0x01);
for (s = 128 / 2; s > 0... |
float sfrand_0_1(unsigned int* seed);
float sfrand_m1_1(unsigned int* seed);
float sfrand_0_1(unsigned int* seed) {
float res;
*seed = mul24(*seed, 16807u);
*((unsigned int*)&res) = ((*seed) >> 9) | 0x3F800000;
return (res - 1.0f);
}
float sfrand_m1_1(unsigned int* seed) {
float res;
*seed = mul24(*seed, 1... |
kernel void eq(global int* out, float a, float b) {
out[0] = a == b;
} |
kernel void kernel_sincos_withoutDD1(global float* result_sincos, int N) {
float t1;
float t2;
float t3;
float t4;
float t5;
float t6;
float t7;
float t8;
float t9;
float t10;
float i = 1.0;
float j;
float n = 10.0 * (float)(N);
for (i = 1.0; i < n; i = i + 1) {
t1 = sincos(i, &j);
... |
kernel void periodogram(global const double* times_g, global const double* mags_g, global const double* freqs_g, global double* amps_g, const int datalength) {
int gid = get_global_id(0);
double this_frequency = freqs_g[gid];
double realpart = 0.0;
double imagpart = 0.0;
double pi = 3.141592653589793;
for ... |
kernel void zero2(global float2* input1, global float2* input2, unsigned int size) {
for (unsigned int i = get_global_id(0); i < size; i += get_global_size(0)) {
input1[i] = 0;
input2[i] = 0;
}
} |
kernel void test_uchar2(global uchar* pin, global uchar* pout) {
int x = get_global_id(0);
uchar2 value;
value = vload2(x, pin);
value += (uchar2){(uchar)1, (uchar)2};
vstore2(value, x, pout);
} |
kernel void sub_wise(global const float* matrix1, global const float* matrix2, global float* result, unsigned int size) {
for (unsigned int i = get_global_id(0); i < size; i += get_global_size(0))
result[i] = matrix1[i] - matrix2[i];
} |
kernel void dot_product_f(global float* x, global float* y, global float* tmp, const unsigned int size) {
unsigned int tid = get_global_id(0);
unsigned int blocksize = get_local_size(0);
const unsigned int iter = size / (get_global_size(0));
unsigned int pos = tid;
float temp = 0;
for (unsigned long i = ... |
kernel void Reduction_Decomp(const global unsigned int* inArray, global unsigned int* outArray, unsigned int N, local unsigned int* localBlock) {
unsigned int id = get_local_id(0);
unsigned int group_id = get_group_id(0);
localBlock[id] = inArray[group_id * N * 2 + id] + inArray[group_id * N * 2 + N + id];
fo... |
kernel void mul(global short* out, short a, short b) {
out[0] = a * b;
} |
kernel void compiler_private_data_overflow(global int4* output) {
int4 data[65];
for (int i = 0; i < 65; ++i) {
data[i] = (int4)i;
}
if (get_global_id(0) == 1)
*output = data[0];
} |
kernel void square(global float* input, int dummy_inthe_middle, global float* output) {
int i = get_global_id(0);
output[i] = input[i] * input[i];
printf("%f,", output[i]);
} |
kernel void globalAtomicKernelOpenCL1_1(volatile global int* counter) {
atomic_inc(counter);
} |
kernel void reduce5(global float* g_idata, global float* g_odata, unsigned int n, local volatile float* sdata) {
unsigned int tid = get_local_id(0);
unsigned int i = get_group_id(0) * (get_local_size(0) * 2) + get_local_id(0);
sdata[tid] = (i < n) ? g_idata[i] : 0;
if (i + 128 < n)
sdata[tid] += g_idata[i ... |
kernel void fill_holes(global float* pixel_pos, global char* hole_ill, int mask_size, global unsigned char* volume, int volume_n, int volume_h, int volume_w) {
int n = get_global_id(0);
if (n >= mask_size)
return;
int x = (pixel_pos[(n)*3 + (0)]);
int y = (pixel_pos[(n)*3 + (1)]);
int z = (pixel_pos[(n)*... |
kernel void qssa_kernel(global float* RF, global float* RB, global float* A) {
float DEN;
(RF[(((57) - 1) * (4)) + (get_global_id(0))]) = 0.e0;
(RF[(((58) - 1) * (4)) + (get_global_id(0))]) = 0.e0;
(RF[(((143) - 1) * (4)) + (get_global_id(0))]) = 0.e0;
(RF[(((179) - 1) * (4)) + (get_global_id(0))]) = 0.e0;
... |
kernel void es_phase_3(global unsigned int* restrict data, global unsigned int* restrict increments, 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 elements_per_block = thre... |
kernel void kernel_fmax_withDD8(global float* result_fmax, int N) {
float t1 = 1.0;
float8 t2 = t1 + (float8)(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7);
int i = 0;
for (i = 0; i < N; i++) {
t2 = fmax(t2, t2);
t2 = fmax(t2, t2);
t2 = fmax(t2, t2);
t2 = fmax(t2, t2);
t2 = fmax(t2, t2);
t2 = fm... |
constant float QUAR = 0.25;
constant float HALF = 0.5;
constant float TWO = 2.;
constant float SIX = 6.;
constant bool isHiPrecision = sizeof(TWO) == 8;
constant float2 zero2 = (float2)(0, 0);
constant float PI2 = (float)6.283185307179586476925286766559;
constant float E2W = 1.51926751475e15;
constant float C = 2.99792... |
kernel void test_arg_5_2_kern(global float* a0, global float* a1, global float* a2, global float* a3, global float* a4, global float* b0, global float* b1) {
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 run_sin(global float* in, global float* out) {
int idx = get_global_id(0);
out[idx] = sin(sin((in[idx])));
} |
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 sort_vectors_by_length(global float* _buf0, global float4* _buf1, const unsigned int count) {
unsigned int index = get_local_id(0) + (32 * get_group_id(0));
for (unsigned int i = 0; i < 4; i++) {
if (index < count) {
_buf0[index] = length(_buf1[index]);
index += 8;
}
}
} |
struct GridParams {
float4 grid_size;
float4 grid_min;
float4 grid_max;
float4 bnd_min;
float4 bnd_max;
float4 grid_res;
float4 grid_delta;
int nb_cells;
};
kernel void lifetime(int num, float increment, global float4* pos_u, global float4* color_u, global float4* color_s, global unsigned int* sort_i... |
kernel void relational_less_than_int8int8(global int8* src_0, global int8* src_1, global int8* dst) {
int gid = get_global_id(0);
dst[gid] = src_0[gid] < src_1[gid];
} |
kernel void vectors(global unsigned int* result, char2 c, short3 s, int4 i, long8 l, ulong16 ul, float16 f) {
ulong cval = convert_ulong((uchar)c.s1);
ulong sval = convert_ulong((ushort)s.s2);
ulong ival = convert_ulong((unsigned int)i.s3);
ulong lval = convert_ulong((unsigned int)l.s7);
ulong ulval = convert... |
kernel void async_copy_single_wi(global int* data, local int* scratch) {
int i = get_local_id(0);
event_t event = async_work_group_copy(scratch, data, get_local_size(0), 0);
if (i == 0) {
event = async_work_group_copy(scratch, data, 1, event);
}
wait_group_events(1, &event);
data[get_local_size(0) - i ... |
kernel void not(global int* out, int 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 MatrixMultiplication(global float const* restrict A, global float const* restrict B, global float* restrict C) {
for (int n = 0; n < 32; ++n) {
float acc[32];
for (int k = 0; k < 32; ++k) {
const float a = A[n * 32 + k];
for (int m = 0; m < 32; ++m) {
const float prev = (k ==... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.