Gather/scatter do not allow C-arrays as their ranges

Open Beginner friendly
#62 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
cpp
Domain
backend

Research direction

Start with the linked Compiler Explorer example to reproduce the failure, then locate the internal gather/scatter functions that call member functions such as r.size(). Replace the member-function assumptions with the corresponding std::ranges free functions where needed, and confirm C-arrays work as ranges in the example.

Written by the indexing model from the issue text.

Description

https://godbolt.org/z/rrfxEY8v3

The internal functions fail because they call member functions (e.g., r.size()) which don't work. Prefer free-function equivalents (e.g., std::ranges::size(r)).

Dominant language
C++
Stars
6
Forks
2
Avg merge
1d 17h
Merged PRs (30d)
7

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from intel/xvec

All issues in intel/xvec

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.