Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 413
    • Issues 413
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 17
    • Merge requests 17
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Merge requests
  • !609

Hint SIMD usage for primitive functions with a V

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Thomas Koopman requested to merge thomas/sac2c:simd-support into develop Feb 06, 2026
  • Overview 0
  • Commits 3
  • Changes 2

What is this?

We hint the C-compiler that it should try harder to generate SIMD instructions for primitive functions that take vectors, e.g., _add_VxV_.

Why?

Because C-compilers suck at SIMD without an #pragma omp simd. I have encountered this in my FFT codes, and Xoshiro experiments. Especially the latter is problematic because it inhibits vectorization of the functions that use the result as well. These can be expensive math functions.

Why not put this everywhere?

These primitive functions are not used often. For with-loops we can have more complicated nestings, fold's, etc. So it is more likely the pragma gives bad advice there.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: simd-support