summaryrefslogtreecommitdiffhomepage
path: root/misc/examples
diff options
context:
space:
mode:
Diffstat (limited to 'misc/examples')
-rw-r--r--misc/examples/multidim.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/misc/examples/multidim.c b/misc/examples/multidim.c
index 43c21443..dbea9699 100644
--- a/misc/examples/multidim.c
+++ b/misc/examples/multidim.c
@@ -14,7 +14,7 @@ int main()
ispan ms1 = cspan_from(&v);
// View the same data as a 3D array 2 x 3 x 4
- ispan3 ms3 = cspan_md('C', v.data, 2, 3, 4);
+ ispan3 ms3 = cspan_md(v.data, 2, 3, 4);
puts("ms3:");
for (int i=0; i != ms3.shape[0]; i++) {
@@ -45,7 +45,7 @@ int main()
printf(" %d", *i.ref);
puts("");
- ispan2 ms2 = cspan_submd3(&ms3, 0);
+ ispan2 ms2 = cspan_submd3(ispan2, &ms3, 0);
// write data using 2D view
for (int i=0; i != ms2.shape[0]; i++)
@@ -58,7 +58,7 @@ int main()
puts("");
puts("iterate subspan ms3[1]:");
- ispan2 sub = cspan_submd3(&ms3, 1);
+ ispan2 sub = cspan_submd3(ispan2, &ms3, 1);
c_foreach (i, ispan2, sub)
printf(" %d", *i.ref);
puts("");