Changes in src/examples/array.c [1ad1c99:4040425]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/examples/array.c
r1ad1c99 r4040425 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // array.c -- 7 // array.c -- 8 8 // 9 9 // Author : Richard C. Bilson 10 10 // Created On : Wed May 27 17:56:53 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Wed Apr 27 17:21:52 201611 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Mar 2 18:13:52 2016 13 13 // Update Count : 3 14 14 // … … 26 26 // The first element is always at index 0. 27 27 forall( otype array_type, otype elt_type | bounded_array( array_type, elt_type ) ) 28 elt_type * begin( array_type *array ) {28 elt_type * begin( array_type array ) { 29 29 return &array[ 0 ]; 30 30 } … … 32 32 // The end iterator should point one past the last element. 33 33 forall( otype array_type, otype elt_type | bounded_array( array_type, elt_type ) ) 34 elt_type * end( array_type *array ) {34 elt_type * end( array_type array ) { 35 35 return &array[ last( array ) ] + 1; 36 36 }
Note: See TracChangeset
for help on using the changeset viewer.