Changes in src/examples/sum.c [b63e376:4040425]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/examples/sum.c
rb63e376 r4040425 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Mar 4 15:06:47201613 // Update Count : 19 612 // Last Modified On : Wed Mar 2 18:12:01 2016 13 // Update Count : 194 14 14 // 15 15 16 16 #include <fstream> 17 17 18 trait sumable( otype T ) {18 trait sumable( type T ) { 19 19 const T 0; 20 20 T ?+?( T, T ); … … 24 24 }; // sumable 25 25 26 forall( otype T | sumable( T ) )26 forall( type T | sumable( T ) ) 27 27 T sum( unsigned int n, T a[] ) { 28 28 T total = 0; // instantiate T, select 0
Note: See TracChangeset
for help on using the changeset viewer.