comparison MasterLoop.c @ 28:8b9e4c333fe6

Sequential Version -- first compile succeeded
author Me
date Mon, 26 Jul 2010 16:42:59 -0700
parents 668278fa7a63
children 0e008278fe3c
comparison
equal deleted inserted replaced
5:7378ed18a43c 6:709d10a79429
161 masterEnv->numToPrecede = 0; 161 masterEnv->numToPrecede = 0;
162 } 162 }
163 else 163 else
164 { masterEnv->numToPrecede = numFilled - NUM_CORES + 1; 164 { masterEnv->numToPrecede = numFilled - NUM_CORES + 1;
165 } 165 }
166 /*
167 //put some scheduled slaves in, then Master continuation, then rest
168 //Adjust position of master such that it maintains close to a fixed
169 // ratio --> make NUM_CORES - 1 slots or fewer come after the master
170
171 for( filledSlotIdx = 0; filledSlotIdx < numPrecede; filledSlotIdx++)
172 {
173 writeVMSQ( filledSlots[ filledSlotIdx ]->procrAssignedToSlot, workQ );
174 }
175
176 //enqueue continuation of this loop
177 // note that After this enqueue, continuation might sneak through
178 writeVMSQ( masterEnv->masterVirtPr, workQ );
179
180 for( filledSlotIdx = numPrecede;
181 filledSlotIdx < numFilled;
182 filledSlotIdx++)
183 {
184 writeVMSQ( filledSlots[ filledSlotIdx ]->procrAssignedToSlot, workQ );
185 }
186
187 masterEnv->numFilled = 0;
188 */
189 166
190 //Save stack ptr and frame -- don't need to, take out later, but safe 167 //Save stack ptr and frame -- don't need to, take out later, but safe
191 // Also, wait to set stillRunning to FALSE until just before jump, to 168 // Also, wait to set stillRunning to FALSE until just before jump, to
192 // be safe -- although the two simulatneously animated MasterLoops 169 // be safe -- although the two simulatneously animated MasterLoops
193 // are on different cores, so have different stacks, so no worries 170 // are on different cores, so have different stacks, so no worries