Skip to content

Commit daf06c9

Browse files
hewillktkoeppe
authored andcommitted
[mdspan.accessor.aligned.overview] Remove std:: in example
1 parent 1ff1e63 commit daf06c9

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
@@ -24505,19 +24505,18 @@
2450524505
that has no over-alignment requirement.
2450624506
\begin{codeblock}
2450724507
void compute_using_fourfold_overalignment(
24508-
std::mdspan<float, std::dims<1>, std::layout_right,
24509-
std::aligned_accessor<float, 4 * alignof(float)>> x);
24508+
mdspan<float, dims<1>, layout_right, aligned_accessor<float, 4 * alignof(float)>> x);
2451024509

2451124510
void compute_without_requiring_overalignment(
24512-
std::mdspan<float, std::dims<1>, std::layout_right> x);
24511+
mdspan<float, dims<1>, layout_right> x);
2451324512

24514-
void compute(std::mdspan<float, std::dims<1>> x) {
24513+
void compute(mdspan<float, dims<1>> x) {
2451524514
constexpr auto byte_alignment = 4 * sizeof(float);
24516-
auto accessor = std::aligned_accessor<float, byte_alignment>{};
24515+
auto accessor = aligned_accessor<float, byte_alignment>{};
2451724516
auto x_handle = x.data_handle();
2451824517

24519-
if (std::is_sufficiently_aligned<byte_alignment>(x_handle)) {
24520-
compute_using_fourfold_overalignment(std::mdspan{x_handle, x.mapping(), accessor});
24518+
if (is_sufficiently_aligned<byte_alignment>(x_handle)) {
24519+
compute_using_fourfold_overalignment(mdspan{x_handle, x.mapping(), accessor});
2452124520
} else {
2452224521
compute_without_requiring_overalignment(x);
2452324522
}

0 commit comments

Comments
 (0)