Changeset b4cd03b7 for src/libcfa
- Timestamp:
- Feb 5, 2016, 12:27:21 PM (10 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 4789f44
- Parents:
- 5721a6d
- Location:
- src/libcfa
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/algorithm
r5721a6d rb4cd03b7 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // alorgithm -- 7 // alorgithm -- 8 8 // 9 9 // Author : Peter A. Buhr … … 16 16 //--------------------------------------- 17 17 18 forall( type T | { int ?<?( T,T ); } )18 forall( type T | { int ?<?( const T, const T ); } ) 19 19 T min( const T t1, const T t2 ); 20 20 21 forall( type T | { int ?>?( T,T ); } )21 forall( type T | { int ?>?( const T, const T ); } ) 22 22 T max( const T t1, const T t2 ); 23 23 -
src/libcfa/algorithm.c
r5721a6d rb4cd03b7 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // algorithm.c -- 7 // algorithm.c -- 8 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Thu Jan 28 17:10:29 2016 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Mon Feb 1 13:42:05201613 // Update Count : 5 211 // Last Modified By : Rob Schluntz 12 // Last Modified On : Thu Feb 04 17:19:12 2016 13 // Update Count : 54 14 14 // 15 15 16 16 #include "algorithm" 17 17 18 forall( type T | { int ?<?( T,T ); } )18 forall( type T | { int ?<?( const T, const T ); } ) 19 19 T min( const T t1, const T t2 ) { 20 20 return t1 < t2 ? t1 : t2; 21 21 } // min 22 22 23 forall( type T | { int ?>?( T,T ); } )23 forall( type T | { int ?>?( const T, const T ); } ) 24 24 T max( const T t1, const T t2 ) { 25 25 return t1 > t2 ? t1 : t2;
Note:
See TracChangeset
for help on using the changeset viewer.