Skip to content
Snippets Groups Projects

Cache auto vec

Merged James Willis requested to merge cache_auto_vec into master

Auto-vectorise populating the cache with hints to the compiler and restrict keyword.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Also, and this is a matter of style so let me know what you think, could we call this macro something else ? It is not just giving information it is actually declaring a pointer.

    How about:

    #define swift_declare_aligned_ptr(type, array, ptr, alignment) \
     ...
    
    swift_declare_aligned_ptr(float, x, cache->x, SWIFT_CACHE_ALIGNMENT);

    I also prefer putting the type as the first argument of the macro. This way it looks even more like the declaration of a pointer which would read

    float *x = cache->x;
  • It gives the same performance

  • James Willis Added 1 commit:

    Added 1 commit:

    • 790b9ed9 - Remove compiler-specific conditions.
  • Unable to load the diff
  • Yeah, that style makes more sense than what I've got.

  • James Willis Added 1 commit:

    Added 1 commit:

  • Fixed in 58b06679.

  • Matthieu Schaller Status changed to merged

    Status changed to merged

  • mentioned in commit 1969a156

  • Please register or sign in to reply
    Loading