Changeset 378096a
- Timestamp:
- Jul 22, 2023, 8:52:04 AM (16 months ago)
- Branches:
- master
- Children:
- 6a4dae6
- Parents:
- a59e338 (diff), 88f2f0f (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. - Location:
- libcfa/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/bits/algorithm.hfa
ra59e338 r378096a 9 9 // Author : Thierry Delisle 10 10 // Created On : Mon Oct 30 13:37:34 2017 11 // Last Modified By : --12 // Last Modified On : --13 // Update Count : 011 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jul 22 08:25:29 2023 13 // Update Count : 3 14 14 // 15 15 … … 17 17 18 18 #ifdef SAFE_SORT 19 forall( T | { 20 forall( T | { 21 forall( T | { 22 forall( T | { 23 forall( T | { 24 forall( T | { 19 forall( T | { int ?<?( T, T ); int ?>?( T, T ); } ) static inline void __libcfa_small_sort2( T * arr ); 20 forall( T | { int ?<?( T, T ); int ?>?( T, T ); } ) static inline void __libcfa_small_sort3( T * arr ); 21 forall( T | { int ?<?( T, T ); int ?>?( T, T ); } ) static inline void __libcfa_small_sort4( T * arr ); 22 forall( T | { int ?<?( T, T ); int ?>?( T, T ); } ) static inline void __libcfa_small_sort5( T * arr ); 23 forall( T | { int ?<?( T, T ); int ?>?( T, T ); } ) static inline void __libcfa_small_sort6( T * arr ); 24 forall( T | { int ?<?( T, T ); int ?>?( T, T ); } ) static inline void __libcfa_small_sortN( T * arr, size_t dim ); 25 25 26 forall( T | { 26 forall( T | { int ?<?( T, T ); int ?>?( T, T ); } ) 27 27 static inline void __libcfa_small_sort( T * arr, size_t dim ) { 28 28 switch( dim ) { … … 41 41 #define SWAP(x,y) { T a = min(arr[x], arr[y]); T b = max(arr[x], arr[y]); arr[x] = a; arr[y] = b;} 42 42 43 forall( T | { 43 forall( T | { int ?<?( T, T ); int ?>?( T, T ); } ) 44 44 static inline void __libcfa_small_sort2( T * arr ) { 45 45 SWAP(0, 1); 46 46 } 47 47 48 forall( T | { 48 forall( T | { int ?<?( T, T ); int ?>?( T, T ); } ) 49 49 static inline void __libcfa_small_sort3( T * arr ) { 50 50 SWAP(1, 2); … … 53 53 } 54 54 55 forall( T | { 55 forall( T | { int ?<?( T, T ); int ?>?( T, T ); } ) 56 56 static inline void __libcfa_small_sort4( T * arr ) { 57 57 SWAP(0, 1); … … 62 62 } 63 63 64 forall( T | { 64 forall( T | { int ?<?( T, T ); int ?>?( T, T ); } ) 65 65 static inline void __libcfa_small_sort5( T * arr ) { 66 66 SWAP(0, 1); … … 75 75 } 76 76 77 forall( T | { 77 forall( T | { int ?<?( T, T ); int ?>?( T, T ); } ) 78 78 static inline void __libcfa_small_sort6( T * arr ) { 79 79 SWAP(1, 2); … … 91 91 } 92 92 93 forall( T | { 93 forall( T | { int ?<?( T, T ); int ?>?( T, T ); } ) 94 94 static inline void __libcfa_small_sortN( T * arr, size_t dim ) { 95 int i, j; 96 for (i = 1; i < dim; i++) { 95 for ( i; 1 ~ dim ) { 97 96 T tmp = arr[i]; 98 for (j = i; j >= 1 && tmp < arr[j-1]; j--) { 97 int j; 98 for ( j = i; j >= 1 && tmp < arr[j-1]; j--) { 99 99 arr[j] = arr[j-1]; 100 100 } … … 175 175 176 176 static inline void __libcfa_small_sortN( void* * arr, size_t dim ) { 177 int i, j;178 for (i = 1; i < dim; i++) {179 void* tmp = arr[i];177 for ( i; 1 ~ dim ) { 178 void * tmp = arr[i]; 179 int j; 180 180 for (j = i; j >= 1 && tmp < arr[j-1]; j--) { 181 181 arr[j] = arr[j-1]; -
libcfa/src/bits/debug.cfa
ra59e338 r378096a 10 10 // Created On : Thu Mar 30 12:30:01 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Apr 22 18:20:26 202213 // Update Count : 1 312 // Last Modified On : Sat Jul 22 08:17:27 2023 13 // Update Count : 14 14 14 // 15 15 … … 33 33 in_buffer += count; 34 34 35 for ( ;;) {35 for () { 36 36 retcode = write( fd, in_buffer, len - count ); 37 37 -
libcfa/src/bits/queue.hfa
ra59e338 r378096a 91 91 T * prev = 0p; 92 92 T * curr = (T *)root; 93 for ( ;;) {93 for () { 94 94 if ( &n == curr ) { // found => remove 95 95 if ( (T *)root == &n ) { -
libcfa/src/concurrency/stats.cfa
ra59e338 r378096a 11 11 #if !defined(__CFA_NO_STATISTICS__) 12 12 void __init_stats( struct __stats_t * stats ) { 13 stats->ready.push.local.attempt = 0; 14 stats->ready.push.local.success = 0; 15 stats->ready.push.share.attempt = 0; 16 stats->ready.push.share.success = 0; 17 stats->ready.push.extrn.attempt = 0; 18 stats->ready.push.extrn.success = 0; 19 stats->ready.pop.local .attempt = 0; 20 stats->ready.pop.local .success = 0; 21 stats->ready.pop.help .attempt = 0; 22 stats->ready.pop.help .success = 0; 23 stats->ready.pop.steal .attempt = 0; 24 stats->ready.pop.steal .success = 0; 25 stats->ready.pop.search.attempt = 0; 26 stats->ready.pop.search.success = 0; 27 stats->ready.threads.migration = 0; 28 stats->ready.threads.extunpark = 0; 29 stats->ready.threads.threads = 0; 30 stats->ready.threads.cthreads = 0; 31 stats->ready.threads.preempt.yield = 0; 32 stats->ready.threads.preempt.rllfwd = 0; 33 stats->ready.sleep.halts = 0; 34 stats->ready.sleep.cancels = 0; 35 stats->ready.sleep.early = 0; 36 stats->ready.sleep.wakes = 0; 37 stats->ready.sleep.seen = 0; 38 stats->ready.sleep.exits = 0; 13 memset( &stats->ready, 0, sizeof( stats->ready ) ); 39 14 40 15 #if defined(CFA_HAVE_LINUX_IO_URING_H) 41 stats->io.alloc.fast = 0; 42 stats->io.alloc.slow = 0; 43 stats->io.alloc.fail = 0; 44 stats->io.alloc.revoke = 0; 45 stats->io.alloc.block = 0; 46 stats->io.submit.fast = 0; 47 stats->io.submit.slow = 0; 48 stats->io.submit.eagr = 0; 49 stats->io.submit.nblk = 0; 50 stats->io.submit.extr = 0; 51 stats->io.flush.external = 0; 52 stats->io.flush.signal = 0; 53 stats->io.flush.dirty = 0; 54 stats->io.flush.full = 0; 55 stats->io.flush.idle = 0; 56 stats->io.flush.eager = 0; 57 stats->io.calls.flush = 0; 58 stats->io.calls.submitted = 0; 59 stats->io.calls.drain = 0; 60 stats->io.calls.completed = 0; 61 stats->io.calls.locked = 0; 62 stats->io.calls.helped = 0; 63 stats->io.calls.errors.busy = 0; 64 stats->io.ops.sockread = 0; 65 stats->io.ops.epllread = 0; 66 stats->io.ops.sockwrite = 0; 67 stats->io.ops.epllwrite = 0; 16 memset( &stats->io, 0, sizeof( stats->io ) ); 68 17 #endif 69 18
Note: See TracChangeset
for help on using the changeset viewer.