Skip to content

Commit 6821fdd

Browse files
authored
[mdspan.accessor.aligned.overview] Remove std:: in example
1 parent 82bf75b commit 6821fdd

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

source/containers.tex

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24525,19 +24525,18 @@
2452524525
that has no over-alignment requirement.
2452624526
\begin{codeblock}
2452724527
void compute_using_fourfold_overalignment(
24528-
std::mdspan<float, std::dims<1>, std::layout_right,
24529-
std::aligned_accessor<float, 4 * alignof(float)>> x);
24528+
mdspan<float, dims<1>, layout_right, aligned_accessor<float, 4 * alignof(float)>> x);
2453024529

2453124530
void compute_without_requiring_overalignment(
24532-
std::mdspan<float, std::dims<1>, std::layout_right> x);
24531+
mdspan<float, dims<1>, layout_right> x);
2453324532

24534-
void compute(std::mdspan<float, std::dims<1>> x) {
24533+
void compute(mdspan<float, dims<1>> x) {
2453524534
constexpr auto byte_alignment = 4 * sizeof(float);
24536-
auto accessor = std::aligned_accessor<float, byte_alignment>{};
24535+
auto accessor = aligned_accessor<float, byte_alignment>{};
2453724536
auto x_handle = x.data_handle();
2453824537

24539-
if (std::is_sufficiently_aligned<byte_alignment>(x_handle)) {
24540-
compute_using_fourfold_overalignment(std::mdspan{x_handle, x.mapping(), accessor});
24538+
if (is_sufficiently_aligned<byte_alignment>(x_handle)) {
24539+
compute_using_fourfold_overalignment(mdspan{x_handle, x.mapping(), accessor});
2454124540
} else {
2454224541
compute_without_requiring_overalignment(x);
2454324542
}

0 commit comments

Comments
 (0)