Skip to content

Align API for conversion of SIMD vectors to arrays wth std::simd - #351

Merged
Shnatsel merged 2 commits into
linebender:mainfrom
Shnatsel:std-simd-api-alignment
Aug 26, 2026
Merged

Align API for conversion of SIMD vectors to arrays wth std::simd#351
Shnatsel merged 2 commits into
linebender:mainfrom
Shnatsel:std-simd-api-alignment

Conversation

@Shnatsel

Copy link
Copy Markdown
Contributor

It's a little silly to have methods with the exact same semantics as std::simd but under different names. This PR aligns the API for converting SIMD vectors to arrays with std::simd so that fearless_simd would be a drop-in replacement as far as these methods are concerned:

  • as_array becomes to_array
  • as_array_ref becomes as_array
  • as_array_mut becomes as_mut_array

I didn't change methods loading arrays and slices because that's not a drop-in replacement either way due to these functions also accepting a SIMD token. We might choose to align them later, but this PR should be an uncontroversial starting point.

@Shnatsel
Shnatsel enabled auto-merge August 26, 2026 20:01
@Shnatsel
Shnatsel added this pull request to the merge queue Aug 26, 2026
Merged via the queue into linebender:main with commit f73a174 Aug 26, 2026
22 checks passed
@Shnatsel
Shnatsel deleted the std-simd-api-alignment branch August 26, 2026 20:08
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.

2 participants