2020年1月5日

opencl(十八)----矩阵转置、矩阵乘法

摘要: 矩阵转置 // kernel __kernel void transpose(__global float4 *g_mat, __local float4 *l_mat, uint size) { __global float4 *src, *dst; /* Determine row and co 阅读全文

posted @ 2020-01-05 22:34 feihu_h 阅读(1294) 评论(0) 推荐(0)

opencl(十七)----基数排序

摘要: 基数排序原理: 分桶,遍历每一个有效位,根据该位中是0还是1进行分组。 设备代码: __kernel void radix_sort8(__global ushort8 *global_data) { typedef union { ushort8 vec; ushort array[8]; } v 阅读全文

posted @ 2020-01-05 21:38 feihu_h 阅读(625) 评论(0) 推荐(0)

opencl(二十五)----双调排序

摘要: 参考:《opencl实战》 双调排序 一个序列:进行升序排列 6 1 4 5 7 2 3 8 a、左右两部分别 升序、降序 1 4 5 6 8 7 3 2 b 、左右度应位置比较,小的左移 1 4 3 2 8 7 5 6 c、左右都整成升序 1 2 3 4 5 6 7 8 注:四个元素如何排序 op 阅读全文

posted @ 2020-01-05 18:38 feihu_h 阅读(972) 评论(0) 推荐(0)

导航