Continuations using C++11

PPL Task While playing with the concurrency features in C++11, I noticed that there wasn’t any support for continuations.  As a learning exercise I decided to develop something similar to tasks in The Parallel Patterns Library (PPL), where a task  can run asynchronously and execute a continuation upon completion using the then  member … Continue reading

Binary Floating Point Operations – part two

King Bromeliad

Previously we saw how to convert a float to a binary value as well as how to extract the relevant integer and fractional parts from that binary value.  We also saw the rules and logic for carrying out addition and subtraction.  Now we will look at multiplication and division of these binary … Continue reading

Binary Floating Point Operations – part one

Floating Points

Have you ever wondered how floating point operations are actually represented on a computer?  No? Me neither 🙂 However I have been reading a book called ‘Mathematics and Physics for Programmers’ by Danny Kodicek and the first chapter covers this.  For one of the exercises it recommends writing code to … Continue reading

Producer-Consumer Pattern Implementations: AAL v STL

Producers and Consumers

I have come across a few good examples of the Producer-Consumer pattern, however they tend to use contrived examples that don’t correlate well to a real world example.  I realise that the examples are generally contrived for the sake of brevity and in order to keep them clear and concise.  I admit that the … Continue reading