Changeset 5546eee4 for doc/theses/mike_brooks_MMath/programs/hello-md.cfa
- Timestamp:
- Dec 16, 2023, 1:01:44 AM (2 years ago)
- Branches:
- master, stuck-waitfor-destruct
- Children:
- b7898ac
- Parents:
- 0fa0201d (diff), 69ab896 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/mike_brooks_MMath/programs/hello-md.cfa
r0fa0201d r5546eee4 1 #include "array.hfa"2 1 #include <fstream.hfa> 2 #include <array.hfa> 3 3 4 4 … … 60 60 forall( [N] ) 61 61 void print1d_cstyle( array(float, N) & c ) { 62 for ( i; N ) {63 printf("%.1f ", c[i]);62 for ( i; N ) { 63 sout | c[i] | nonl; 64 64 } 65 printf("\n");65 sout | nl; 66 66 } 67 68 67 69 68 … … 81 80 void print1d( C & c ) { 82 81 for( i; N ) { 83 printf("%.1f ", c[i]);82 sout | c[i] | nonl; 84 83 } 85 printf("\n");84 sout | nl; 86 85 } 87 86 … … 103 102 for ( j; 7 ) { 104 103 a[i,j] = 1.0 * i + 0.1 * j; 105 printf("%.1f ", a[i,j]);104 sout | a[[i,j]] | nonl; 106 105 } 107 printf("\n");106 sout | nl; 108 107 } 109 printf("\n");108 sout | nl; 110 109 } 111 110 112 111 int main() { 113 114 112 115 113 … … 128 126 */ 129 127 128 129 130 130 131 131 … … 168 168 169 169 } 170 171 172
Note:
See TracChangeset
for help on using the changeset viewer.