Skip to content

Commit

Permalink
Add aligned_accessor example
Browse files Browse the repository at this point in the history
1. aligned_accessor uses compiler identification macros to pick
   from various, possibly nonstandard ways to mark a pointer
   (its value, and/or its type) as having a specific alignment.

2. "Aligned" benchmarks use overaligned allocation
   and the aforementioned way to mark a pointer as aligned.

3. "Unaligned' benchmarks access memory aligned only
   to the element type, by adding 1 (sizeof(ElementType) bytes)
   to the array start.
  • Loading branch information
mhoemmen committed Aug 18, 2022
1 parent 64e93f4 commit 402723b
Show file tree
Hide file tree
Showing 3 changed files with 637 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ add_subdirectory(godbolt_starter)
add_subdirectory(dot_product)
add_subdirectory(tiled_layout)
add_subdirectory(restrict_accessor)
add_subdirectory(aligned_accessor)
1 change: 1 addition & 0 deletions examples/aligned_accessor/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mdspan_add_example(aligned_accessor)
Loading

0 comments on commit 402723b

Please sign in to comment.