Skip to content

[FEA]: Support DoubleBuffer overloads in the LRB segmented-sort backend #12470

Open

Description

@anikaj-eng

Area

CUB

Problem

The current internal LRB adapter uses explicit input/output pointers and does not implement DoubleBuffer semantics. DoubleBuffer support must keep selector bookkeeping correct and avoid an unnecessary full-size intermediate allocation when the caller's buffers can be reused.

Proposed work

  • Accept current/alternate buffers and their initial selectors through the LRB dispatch/test adapter.
  • Coordinate bounded and overflow sorting so all results are discoverable through the returned selector; do not allow bins to finish in incompatible buffers.
  • Reuse both caller buffers for radix ping-pong where legal, while preserving the separate-pointer overload's input-preservation contract.
  • Add value-buffer selector handling alongside key/value support, keeping corresponding key/value results aligned.

Validation / completion criteria

  • Exercise both initial selector values, repeated calls, empty inputs, bounded-only, overflow-only, and mixed workloads.
  • Run existing DoubleBuffer keys tests and pair tests as pair support becomes available.
  • Report selector results and temporary-storage savings relative to pointer-based execution; do not claim that DoubleBuffer removes all workspace.

Context

Follow-up to the LRB segmented-sort backend in #12236.

Related follow-ups

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

  • Status
    Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions