NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

So you need to have 4 functions per task (qsort/msort/fib) - divide, combine, base, threshold
Divide should take an input and return two inputs
Combine should take two outputs and return one output
Base should take an input and return an output
And threshold should take an input and return a boolean

Divide is where you split tasks into multiple tasks, so fib(10) becomes fib(9) and fib(8), or ... divide(10) = [9, 8]
Combine is where you join them, so if the results from fib are 1 and 2, combine(1, 2) = 3
Base runs an input through the actual function to get the output, so base(10) = fib(10)
Threshold takes an input and determines if you need to split it into multiple tasks or if you should go straight to base

Note on threshold, it controls how parallel your operation is - say if you have fib(50) and your threshold is fib(30), that means any task under fib(30) is going to be run sequentially
If you have fib(50) with threshold fib(1), that means every task is going to be split into parallel before fib(1) can be resolved sequentially

So for fib, the only time you call it is in base
for msort, my combine calls merge and my base calls mergesort
for qsort, my divide calls partition and my base calls quicksort

No you have the set of DC methods for each task
You'll probably want a struct with function pointers to the divide/combine/base/threshold functions for each DC
then just give that to your scheduler thing


Like you'll need some sort of control logic to coordinate the worker starting/ending/returning the result

     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.