Skip to content

Commit 920722b

Browse files
authored
[linalg] Spacing in example 'for' loops (#6962)
1 parent 33486e0 commit 920722b

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

source/numerics.tex

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12327,7 +12327,7 @@
1232712327
void test_scaled(mdspan<double, extents<int, 10>> x)
1232812328
{
1232912329
auto x_scaled = scaled(5.0, x);
12330-
for(int i = 0; i < x.extent(0); ++i) {
12330+
for (int i = 0; i < x.extent(0); ++i) {
1233112331
assert(x_scaled[i] == 5.0 * x[i]);
1233212332
}
1233312333
}
@@ -12486,22 +12486,22 @@
1248612486
\begin{codeblock}
1248712487
void test_conjugated_complex(mdspan<complex<double>, extents<int, 10>> a) {
1248812488
auto a_conj = conjugated(a);
12489-
for(int i = 0; i < a.extent(0); ++i) {
12489+
for (int i = 0; i < a.extent(0); ++i) {
1249012490
assert(a_conj[i] == conj(a[i]);
1249112491
}
1249212492
auto a_conj_conj = conjugated(a_conj);
12493-
for(int i = 0; i < a.extent(0); ++i) {
12493+
for (int i = 0; i < a.extent(0); ++i) {
1249412494
assert(a_conj_conj[i] == a[i]);
1249512495
}
1249612496
}
1249712497

1249812498
void test_conjugated_real(mdspan<double, extents<int, 10>> a) {
1249912499
auto a_conj = conjugated(a);
12500-
for(int i = 0; i < a.extent(0); ++i) {
12500+
for (int i = 0; i < a.extent(0); ++i) {
1250112501
assert(a_conj[i] == a[i]);
1250212502
}
1250312503
auto a_conj_conj = conjugated(a_conj);
12504-
for(int i = 0; i < a.extent(0); ++i) {
12504+
for (int i = 0; i < a.extent(0); ++i) {
1250512505
assert(a_conj_conj[i] == a[i]);
1250612506
}
1250712507
}
@@ -12791,8 +12791,8 @@
1279112791
assert(a.stride(0) == a_t.stride(1));
1279212792
assert(a.stride(1) == a_t.stride(0));
1279312793

12794-
for(size_t row = 0; row < num_rows; ++row) {
12795-
for(size_t col = 0; col < num_rows; ++col) {
12794+
for (size_t row = 0; row < num_rows; ++row) {
12795+
for (size_t col = 0; col < num_rows; ++col) {
1279612796
assert(a[row, col] == a_t[col, row]);
1279712797
}
1279812798
}
@@ -12803,8 +12803,8 @@
1280312803
assert(a.stride(0) == a_t_t.stride(0));
1280412804
assert(a.stride(1) == a_t_t.stride(1));
1280512805

12806-
for(size_t row = 0; row < num_rows; ++row) {
12807-
for(size_t col = 0; col < num_rows; ++col) {
12806+
for (size_t row = 0; row < num_rows; ++row) {
12807+
for (size_t col = 0; col < num_rows; ++col) {
1280812808
assert(a[row, col] == a_t_t[row, col]);
1280912809
}
1281012810
}
@@ -12843,8 +12843,8 @@
1284312843
assert(a.stride(0) == a_ct.stride(1));
1284412844
assert(a.stride(1) == a_ct.stride(0));
1284512845

12846-
for(size_t row = 0; row < num_rows; ++row) {
12847-
for(size_t col = 0; col < num_rows; ++col) {
12846+
for (size_t row = 0; row < num_rows; ++row) {
12847+
for (size_t col = 0; col < num_rows; ++col) {
1284812848
assert(a[row, col] == conj(a_ct[col, row]));
1284912849
}
1285012850
}
@@ -12855,8 +12855,8 @@
1285512855
assert(a.stride(0) == a_ct_ct.stride(0));
1285612856
assert(a.stride(1) == a_ct_ct.stride(1));
1285712857

12858-
for(size_t row = 0; row < num_rows; ++row) {
12859-
for(size_t col = 0; col < num_rows; ++col) {
12858+
for (size_t row = 0; row < num_rows; ++row) {
12859+
for (size_t col = 0; col < num_rows; ++col) {
1286012860
assert(a[row, col] == a_ct_ct[row, col]);
1286112861
assert(conj(a_ct[col, row]) == a_ct_ct[row, col]);
1286212862
}

0 commit comments

Comments
 (0)