diff options
| author | Tyge Løvset <[email protected]> | 2023-08-21 18:31:49 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-08-21 18:31:49 +0200 |
| commit | 2d33308d36063f3726f3652b0b0cbe3668b8bc68 (patch) | |
| tree | 2f3750a00190e48682b9082a36a5085defa128e0 /misc | |
| parent | 7b57eb4240ee886278b862ed8c90618376237afc (diff) | |
| download | STC-modified-2d33308d36063f3726f3652b0b0cbe3668b8bc68.tar.gz STC-modified-2d33308d36063f3726f3652b0b0cbe3668b8bc68.zip | |
Changed 'order' to 'layout' in cspan md.
Neigher the 'C' / 'F' convension from python, nor left / right from std::mdspan are great names => changed to c_ROWMAJOR / c_COLMAJOR like in matlab.
Diffstat (limited to 'misc')
| -rw-r--r-- | misc/examples/spans/matmult.c | 4 | ||||
| -rw-r--r-- | misc/examples/spans/mdspan.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/misc/examples/spans/matmult.c b/misc/examples/spans/matmult.c index 35dad7a9..266fa121 100644 --- a/misc/examples/spans/matmult.c +++ b/misc/examples/spans/matmult.c @@ -70,8 +70,8 @@ int main(void) Values_push(&values, (crandf() - 0.5)*4.0); double out[D1*D2]; - Mat3 data = cspan_md_order('C', values.data, N, D1, D2); - OutMat c = cspan_md_order('C', out, D1, D2); + Mat3 data = cspan_md_layout(c_ROWMAJOR, values.data, N, D1, D2); + OutMat c = cspan_md_layout(c_ROWMAJOR, out, D1, D2); Mat2 a = cspan_submd3(&data, 0); double sum = 0.0; clock_t t = clock(); diff --git a/misc/examples/spans/mdspan.c b/misc/examples/spans/mdspan.c index db601850..630ffddb 100644 --- a/misc/examples/spans/mdspan.c +++ b/misc/examples/spans/mdspan.c @@ -9,7 +9,7 @@ int main(void) { double* data = c_new_n(double, nx*ny*nz); printf("\nMultidim span ms[5, 4, 3], fortran ordered"); - DSpan3 ms = cspan_md_order('F', data, nx, ny, nz); // Fortran, not 'C' + DSpan3 ms = cspan_md_layout(c_COLMAJOR, data, nx, ny, nz); int idx = 0; for (int i = 0; i < ms.shape[0]; ++i) |
