courses:high_performance_computing:producer_consumer
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
courses:high_performance_computing:producer_consumer [2018/09/28 11:45] – kel | courses:high_performance_computing:producer_consumer [2018/10/07 15:58] – kel | ||
---|---|---|---|
Line 47: | Line 47: | ||
void* consumer_routine(void* arg) { | void* consumer_routine(void* arg) { | ||
// notify about start | // notify about start | ||
- | // allocate value for result | ||
// for every update issued by producer, read the value and add to sum | // for every update issued by producer, read the value and add to sum | ||
- | // return pointer to result | + | // return pointer to result |
} | } | ||
Line 59: | Line 58: | ||
int run_threads() { | int run_threads() { | ||
- | // start 3 threads and wait until they' | + | // start N threads and wait until they' |
- | // return sum of update | + | // return |
return 0; | return 0; |
courses/high_performance_computing/producer_consumer.txt · Last modified: 2024/03/04 02:19 by odoronin