- File:
-
- 1 edited
-
tests/array-container/array-basic.cfa (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/array-container/array-basic.cfa
rb9dae14c r6e50a6b 61 61 forall( [Nw], [Nx], [Ny], [Nz] ) 62 62 void fillHelloData( array( float, Nw, Nx, Ny, Nz ) & wxyz ) { 63 for (w; z(Nw))64 for (x; z(Nx))65 for (y; z(Ny))66 for (z; z(Nz))63 for (w; Nw) 64 for (x; Nx) 65 for (y; Ny) 66 for (z; Nz) 67 67 wxyz[w][x][y][z] = getMagicNumber(w, x, y, z); 68 68 } 69 69 70 forall( [ Zn]70 forall( [N] 71 71 , S & | sized(S) 72 72 ) 73 float total1d_low( arpk( Zn, S, float, float ) & a ) {73 float total1d_low( arpk(N, S, float, float ) & a ) { 74 74 float total = 0.0f; 75 for (i; z(Zn))75 for (i; N) 76 76 total += a[i]; 77 77 return total; … … 98 98 99 99 expect = 0; 100 for (i; z(Nw))100 for (i; Nw) 101 101 expect += getMagicNumber( i, slice_ix, slice_ix, slice_ix ); 102 102 printf("expect Ws = %f\n", expect); … … 117 117 118 118 expect = 0; 119 for (i; z(Nx))119 for (i; Nx) 120 120 expect += getMagicNumber( slice_ix, i, slice_ix, slice_ix ); 121 121 printf("expect Xs = %f\n", expect);
Note:
See TracChangeset
for help on using the changeset viewer.