Changes in / [18ea270:d63aeba]


Ignore:
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/channel.hfa

    r18ea270 rd63aeba  
    2828    exp_backoff_then_block_lock c_lock, p_lock;
    2929    __spinlock_t mutex_lock;
    30     char __padding[64]; // avoid false sharing in arrays
    3130};
    3231
  • tests/concurrent/channels/parallel_harness.hfa

    r18ea270 rd63aeba  
    100100
    101101int test( size_t Processors, size_t Channels, size_t Producers, size_t Consumers, size_t ChannelSize ) {
    102     size_t Clusters = Processors;
     102    size_t Clusters = 1;
    103103    // create a cluster
    104104    cluster clus[Clusters];
     
    108108    }
    109109
    110     channels = aalloc( Channels );
     110    channels = anew( Channels );
    111111
    112112    // sout | "Processors: " | Processors | " ProdsPerChan: " | Producers | " ConsPerChan: " | Consumers | "Channels: " | Channels | " Channel Size: " | ChannelSize;
     
    150150       
    151151    }
    152 
     152    // for ( i; Channels ) {
     153    //     // sout | get_count( channels[i] );
     154    //     if ( get_count( channels[i] ) < Consumers ){
     155    //         #ifdef BIG
     156    //         bigObject b{0};
     157    //         #endif
     158    //         for ( j; Consumers ) {
     159    //             #ifdef BIG
     160    //             insert( channels[i], b );
     161    //             #else
     162    //             insert( channels[i], 0 );
     163    //             #endif
     164    //         }
     165    //     }
     166    // }
    153167    sout | "cons";
    154168    for ( i; Consumers * Channels ) {
Note: See TracChangeset for help on using the changeset viewer.