Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
EgorOrachyov opened this issue Apr 20, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed topic:gpu OpenCL (Compute) related

Comments

@EgorOrachyov
Copy link
Contributor

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

@EgorOrachyov EgorOrachyov added enhancement New feature or request topic:gpu OpenCL (Compute) related labels Apr 20, 2023
@EgorOrachyov EgorOrachyov added this to the Stage 4. New horizon milestone Apr 20, 2023
@EgorOrachyov EgorOrachyov added help wanted Extra attention is needed good first issue Good for newcomers labels Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed topic:gpu OpenCL (Compute) related
Projects
None yet
Development

No branches or pull requests

1 participant