|
12327 | 12327 | void test_scaled(mdspan<double, extents<int, 10>> x)
|
12328 | 12328 | {
|
12329 | 12329 | 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) { |
12331 | 12331 | assert(x_scaled[i] == 5.0 * x[i]);
|
12332 | 12332 | }
|
12333 | 12333 | }
|
@@ -12486,22 +12486,22 @@
|
12486 | 12486 | \begin{codeblock}
|
12487 | 12487 | void test_conjugated_complex(mdspan<complex<double>, extents<int, 10>> a) {
|
12488 | 12488 | 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) { |
12490 | 12490 | assert(a_conj[i] == conj(a[i]);
|
12491 | 12491 | }
|
12492 | 12492 | 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) { |
12494 | 12494 | assert(a_conj_conj[i] == a[i]);
|
12495 | 12495 | }
|
12496 | 12496 | }
|
12497 | 12497 |
|
12498 | 12498 | void test_conjugated_real(mdspan<double, extents<int, 10>> a) {
|
12499 | 12499 | 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) { |
12501 | 12501 | assert(a_conj[i] == a[i]);
|
12502 | 12502 | }
|
12503 | 12503 | 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) { |
12505 | 12505 | assert(a_conj_conj[i] == a[i]);
|
12506 | 12506 | }
|
12507 | 12507 | }
|
|
12791 | 12791 | assert(a.stride(0) == a_t.stride(1));
|
12792 | 12792 | assert(a.stride(1) == a_t.stride(0));
|
12793 | 12793 |
|
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) { |
12796 | 12796 | assert(a[row, col] == a_t[col, row]);
|
12797 | 12797 | }
|
12798 | 12798 | }
|
|
12803 | 12803 | assert(a.stride(0) == a_t_t.stride(0));
|
12804 | 12804 | assert(a.stride(1) == a_t_t.stride(1));
|
12805 | 12805 |
|
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) { |
12808 | 12808 | assert(a[row, col] == a_t_t[row, col]);
|
12809 | 12809 | }
|
12810 | 12810 | }
|
|
12843 | 12843 | assert(a.stride(0) == a_ct.stride(1));
|
12844 | 12844 | assert(a.stride(1) == a_ct.stride(0));
|
12845 | 12845 |
|
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) { |
12848 | 12848 | assert(a[row, col] == conj(a_ct[col, row]));
|
12849 | 12849 | }
|
12850 | 12850 | }
|
|
12855 | 12855 | assert(a.stride(0) == a_ct_ct.stride(0));
|
12856 | 12856 | assert(a.stride(1) == a_ct_ct.stride(1));
|
12857 | 12857 |
|
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) { |
12860 | 12860 | assert(a[row, col] == a_ct_ct[row, col]);
|
12861 | 12861 | assert(conj(a_ct[col, row]) == a_ct_ct[row, col]);
|
12862 | 12862 | }
|
|
0 commit comments