As a part of my project I have to modify a Numerical Integration Algorithm using threads.
This is roughly what happens in the conventional sequential approach..
void Controller(struct DE)
{
//initialization step
for(;;) //till the entire range has not been covered...
{
//compute the next time-point solution using the previously known solutions.
NIiter();
//then check if the result is acceptable or not and take the necessary steps...
}
}
Now this is what I intend to do….
void Controller(struct DE)
{
//initialization step
for(;;) //till the entire range has been covered...
{
//compute the next time using the previously known solution.
NIiter();
//when I have an approximate solution available..launch a thread to compute the next time-point using this approximate solution as a previous solution...something like forward pipelining...
//then check if BOTH the results are acceptable or not and take the necessary steps...
}
}
But I dont understand how to notify my controller that the an approximate solution is available…so it can launch a new thread…
This is my first exposure to multi-threaded programming…so forgive me if this seems to be an obvious question..also I am using Pthread library in my project…
This is a vast topic but here are some pointers
The Wikipedia will get you going.