summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/spans/mdspan.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/examples/spans/mdspan.c')
-rw-r--r--misc/examples/spans/mdspan.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/misc/examples/spans/mdspan.c b/misc/examples/spans/mdspan.c
index 4427299c..db601850 100644
--- a/misc/examples/spans/mdspan.c
+++ b/misc/examples/spans/mdspan.c
@@ -12,17 +12,17 @@ int main(void) {
DSpan3 ms = cspan_md_order('F', data, nx, ny, nz); // Fortran, not 'C'
int idx = 0;
- c_forrange (i, ms.shape[0])
- c_forrange (j, ms.shape[1])
- c_forrange (k, ms.shape[2])
+ for (int i = 0; i < ms.shape[0]; ++i)
+ for (int j = 0; j < ms.shape[1]; ++j)
+ for (int k = 0; k < ms.shape[2]; ++k)
*cspan_at(&ms, i, j, k) = ++idx;
cspan_transpose(&ms);
printf(", transposed:\n\n");
- c_forrange (i, ms.shape[0]) {
- c_forrange (j, ms.shape[1]) {
- c_forrange (k, ms.shape[2])
+ for (int i = 0; i < ms.shape[0]; ++i) {
+ for (int j = 0; j < ms.shape[1]; ++j) {
+ for (int k = 0; k < ms.shape[2]; ++k)
printf(" %3g", *cspan_at(&ms, i, j, k));
puts("");
}