Changes in / [378096a:a59e338]


Ignore:
Location:
libcfa/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/bits/algorithm.hfa

    r378096a ra59e338  
    99// Author           : Thierry Delisle
    1010// Created On       : Mon Oct 30 13:37:34 2017
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jul 22 08:25:29 2023
    13 // Update Count     : 3
     11// Last Modified By : --
     12// Last Modified On : --
     13// Update Count     : 0
    1414//
    1515
     
    1717
    1818#ifdef SAFE_SORT
    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 );
     19forall( T | {  int ?<?( T, T ); int ?>?( T, T ); } ) static inline void __libcfa_small_sort2( T * arr );
     20forall( T | {  int ?<?( T, T ); int ?>?( T, T ); } ) static inline void __libcfa_small_sort3( T * arr );
     21forall( T | {  int ?<?( T, T ); int ?>?( T, T ); } ) static inline void __libcfa_small_sort4( T * arr );
     22forall( T | {  int ?<?( T, T ); int ?>?( T, T ); } ) static inline void __libcfa_small_sort5( T * arr );
     23forall( T | {  int ?<?( T, T ); int ?>?( T, T ); } ) static inline void __libcfa_small_sort6( T * arr );
     24forall( T | {  int ?<?( T, T ); int ?>?( T, T ); } ) static inline void __libcfa_small_sortN( T * arr, size_t dim );
    2525
    26 forall( T | { int ?<?( T, T ); int ?>?( T, T ); } )
     26forall( T | {  int ?<?( T, T ); int ?>?( T, T ); } )
    2727static inline void __libcfa_small_sort( T * arr, size_t dim ) {
    2828        switch( dim ) {
     
    4141#define SWAP(x,y) { T a = min(arr[x], arr[y]); T b = max(arr[x], arr[y]); arr[x] = a; arr[y] = b;}
    4242
    43 forall( T | { int ?<?( T, T ); int ?>?( T, T ); } )
     43forall( T | {  int ?<?( T, T ); int ?>?( T, T ); } )
    4444static inline void __libcfa_small_sort2( T * arr ) {
    4545        SWAP(0, 1);
    4646}
    4747
    48 forall( T | { int ?<?( T, T ); int ?>?( T, T ); } )
     48forall( T | {  int ?<?( T, T ); int ?>?( T, T ); } )
    4949static inline void __libcfa_small_sort3( T * arr ) {
    5050        SWAP(1, 2);
     
    5353}
    5454
    55 forall( T | { int ?<?( T, T ); int ?>?( T, T ); } )
     55forall( T | {  int ?<?( T, T ); int ?>?( T, T ); } )
    5656static inline void __libcfa_small_sort4( T * arr ) {
    5757        SWAP(0, 1);
     
    6262}
    6363
    64 forall( T | { int ?<?( T, T ); int ?>?( T, T ); } )
     64forall( T | {  int ?<?( T, T ); int ?>?( T, T ); } )
    6565static inline void __libcfa_small_sort5( T * arr ) {
    6666        SWAP(0, 1);
     
    7575}
    7676
    77 forall( T | { int ?<?( T, T ); int ?>?( T, T ); } )
     77forall( T | {  int ?<?( T, T ); int ?>?( T, T ); } )
    7878static inline void __libcfa_small_sort6( T * arr ) {
    7979        SWAP(1, 2);
     
    9191}
    9292
    93 forall( T | { int ?<?( T, T ); int ?>?( T, T ); } )
     93forall( T | {  int ?<?( T, T ); int ?>?( T, T ); } )
    9494static inline void __libcfa_small_sortN( T * arr, size_t dim ) {
    95         for ( i; 1 ~ dim ) {
     95        int i, j;
     96        for (i = 1; i < dim; i++) {
    9697                T tmp = arr[i];
    97                 int j;
    98                 for ( j = i; j >= 1 && tmp < arr[j-1]; j--) {
     98                for (j = i; j >= 1 && tmp < arr[j-1]; j--) {
    9999                        arr[j] = arr[j-1];
    100100                }
     
    175175
    176176static inline void __libcfa_small_sortN( void* * arr, size_t dim ) {
    177         for ( i; 1 ~ dim ) {
    178                 void * tmp = arr[i];
    179                 int j;
     177        int i, j;
     178        for (i = 1; i < dim; i++) {
     179                void* tmp = arr[i];
    180180                for (j = i; j >= 1 && tmp < arr[j-1]; j--) {
    181181                        arr[j] = arr[j-1];
  • libcfa/src/bits/debug.cfa

    r378096a ra59e338  
    1010// Created On       : Thu Mar 30 12:30:01 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jul 22 08:17:27 2023
    13 // Update Count     : 14
     12// Last Modified On : Fri Apr 22 18:20:26 2022
     13// Update Count     : 13
    1414//
    1515
     
    3333                        in_buffer += count;
    3434
    35                         for () {
     35                        for ( ;; ) {
    3636                                retcode = write( fd, in_buffer, len - count );
    3737
  • libcfa/src/bits/queue.hfa

    r378096a ra59e338  
    9191                        T * prev = 0p;
    9292                        T * curr = (T *)root;
    93                         for () {
     93                        for ( ;; ) {
    9494                                if ( &n == curr ) {                                             // found => remove
    9595                                        if ( (T *)root == &n ) {
  • libcfa/src/concurrency/stats.cfa

    r378096a ra59e338  
    1111#if !defined(__CFA_NO_STATISTICS__)
    1212        void __init_stats( struct __stats_t * stats ) {
    13                 memset( &stats->ready, 0, sizeof( stats->ready ) );
     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;
    1439
    1540                #if defined(CFA_HAVE_LINUX_IO_URING_H)
    16                         memset( &stats->io, 0, sizeof( stats->io ) );
     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;
    1768                #endif
    1869
Note: See TracChangeset for help on using the changeset viewer.