diff options
| author | Tyge Løvset <[email protected]> | 2023-01-29 17:24:33 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-01-29 17:24:33 +0100 |
| commit | 209bf743e0c1253a4bc81d2ffb6897f657a84c8a (patch) | |
| tree | 9631a2a79e1890cb7c46515aae0ef105710ad59c /misc/examples/multidim.c | |
| parent | a344b43728ff40a2e1ee25f2f1b592f33432aee7 (diff) | |
| download | STC-modified-209bf743e0c1253a4bc81d2ffb6897f657a84c8a.tar.gz STC-modified-209bf743e0c1253a4bc81d2ffb6897f657a84c8a.zip | |
Some method renaming in cspan: cspan_multidim() ctor => cspan_md(). cspan_atN() => cspan_submdN().
cstr_replace_ex() merged as overload of cstr_replace().
Diffstat (limited to 'misc/examples/multidim.c')
| -rw-r--r-- | misc/examples/multidim.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/misc/examples/multidim.c b/misc/examples/multidim.c index e25d727e..b7ee46fb 100644 --- a/misc/examples/multidim.c +++ b/misc/examples/multidim.c @@ -16,7 +16,7 @@ int main() ispan ms1 = cspan_from(&v); // View the same data as a 3D array 2 x 3 x 4 - ispan3 ms3 = cspan_multidim(v.data, 2, 3, 4); + ispan3 ms3 = cspan_md(v.data, 2, 3, 4); puts("ms3:"); for (unsigned i=0; i != ms3.dim[0]; i++) { @@ -47,7 +47,7 @@ int main() printf(" %d", *i.ref); puts(""); - ispan2 ms2 = cspan_at3(&ms3, 0); + ispan2 ms2 = cspan_submd3(&ms3, 0); // write data using 2D view for (unsigned i=0; i != ms2.dim[0]; i++) @@ -60,7 +60,7 @@ int main() puts(""); puts("iterate subspan ms3[1]:"); - ispan2 sub = cspan_at3(&ms3, 1); + ispan2 sub = cspan_submd3(&ms3, 1); c_FOREACH (i, ispan2, sub) printf(" %d", *i.ref); puts(""); |
