OpenCL: implement tile-based element-wise mult of two sorted key-value arrays (Set intersection)

未关闭
#216 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
15/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
c, cpp
领域
hpc

调研方向

Start from the proposed cl_intersect signature and the worked example, which gives the expected r_keys [4, 7] and r_values [7, 32]. Read the linked Boost.Compute set_intersection.hpp to see how sorted-key intersection is done on the GPU, then work out how the value lambda f is applied to matching keys. Done when the function reproduces the example output for sorted, unique-key inputs.

由索引模型根据 Issue 内容生成。

描述

enhancement good first issue help wanted topic:gpu

Signature

void cl_intersect(cl::Queue, 
cl::Buffer a_keys, cl::Buffer a_values, uint a_size, 
cl::Buffer b_keys, cl::Buffer b_values. uint b_size,
cl::Buffer& r_keys, cl::Buffer& r_values, uint &r_size,
...)

Intpu: two sorted key-value arrays

A

uint a_size
uint a_keys[a_size] -- sorted, all keys unique, no duplicates
T a_values[a_size]

B

uint b_size
uint b_keys[b_size] -- sorted, all keys unique, no duplicates
T b_values[b_size]

Function

lambda func f: T x T -> T

Result: logical intersection of keys a and keys b

r_size <= min(a_size, b_size)

uint r_keys[r_size]
T r_values[r_size]

Example

a_keys [0, 1, 4, 7]
a_values [10, 10, 5, 30]

b_keys [2, 4, 5, 7, 8]
b_values [20, 2, 2, 2, 30]

f = (x, y) -> x + y

r_keys = [4, 7]
r_values = [7, 32]

Resources and links

主要语言
C++
星标
37
派生
21
平均合并
11 小时 3 分钟
30 天内合并 PR
13

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

SparseLinearAlgebra/spla 的其他 Issue

查看 SparseLinearAlgebra/spla 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。