View Full Version : Questions on multi-core applications
10-26-2012, 03:22 PM
Standard format the tutorials teach me is
C[i] = a[i] + b[i];
what if I don't want an array
what if I want something akin to
sumTotal = x + rnd();
ran on multiple cores?
Is that possible?
10-26-2012, 04:13 PM
Since I don't know how to edit my post (can't find the button), I'll explain how I have my code setup on multiple threads.
I have a threadStructure that is an array, 1 per thread.
this threadStructure has a member variable named "runningTotal"
each runningTotal is summed together after x number of runs per each thread.
so, I guess I could use an array, but rather than C[i], I would use threadStructure[i].runningTotal =...
but I don't know if that's what I want. As each runningTotal is ran through a loop to achieve
runningTotal = x + rnd();
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.