Open Source & Linux Lab

It's better when it's simple

User Tools

Site Tools


courses:high_performance_computing:producer_consumer

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
courses:high_performance_computing:producer_consumer [2018/09/28 11:45] kelcourses: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 (aggregated result for all consumers)
 } }
  
Line 59: Line 58:
  
 int run_threads() { int run_threads() {
-  // start threads and wait until they're done +  // start threads and wait until they're done 
-  // return sum of update values seen by consumer+  // return aggregated sum of values
  
   return 0;   return 0;
courses/high_performance_computing/producer_consumer.txt · Last modified: 2024/03/04 02:19 by odoronin