Skip to content

gh-216: add intersect - #245

Open
LuhTonkaYeat wants to merge 1 commit into
SparseLinearAlgebra:mainfrom
LuhTonkaYeat:feature/cl-intersect
Open

LuhTonkaYeat wants to merge 1 commit into
SparseLinearAlgebra:mainfrom
LuhTonkaYeat:feature/cl-intersect

Conversation

@LuhTonkaYeat

Copy link
Copy Markdown

Adds exec_intersect --- set intersection of two sorted key-value arrays with a
binary operation applied to matched values.

Implementation

  • CPU: cpu_intersect.hpp (two-pointer merge).
  • OpenCL: cl_intersect.hpp + kernel intersect.cl.
  • Public API, schedule task, registry entries (INT/UINT/FLOAT), C binding
    spla_Exec_intersect.

OpenCL notes

  • Result stored as a coordinate (COO) vector so genuine zero keys/values are
    not confused with empty entries.
  • Grid-stride kernel loop (large inputs were previously truncated by the grid
    clamp).
  • Null-argument guard for parity with CPU.

Tests

  • CPU: test_intersect (7 cases).
  • OpenCL: test_opencl_intersect (17 cases) — types, boundary keys/values,
    large inputs, negative cases, deferred (scheduled) path.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant