Evening all,
Using Obj-C, I'm working out all the permutations of 0 and 1 for a given number of elements in an array. For example, if you had an array length of 4, the permutations would be:
Now, I'm trying to do the same with an array with the size 49152, and it's going to take a while...I've got four cores in this iMac, so why not use them?
It's been ages since I've done anything about concurrency, and it was only really touched on in Java with regards to GUI programming.
The methods I'm using looks something like this:
So, two questions:
1) Is this type of work possible to do concurrently?
2) How might a concurrent way look? I'm presumably going to be doing some blocks/GCD stuff...
Many thanks,
Ben