The following strategy could thus be applied. Partition the chunk to be processed into n blocks of k/n bytes each. For example, a chunk of 512 bytes could be split into n = 64 blocks of 8 bytes each. In a first stage which we call Step 0, a set of n processors is used to work simultaneously on the n blocks of the chunk. In Step 1, only n/2
processors are used, each acting on two blocks evaluated in the previous step, and in general in Step i, only n/2i processors are used, each acting on two blocks evaluated in the previous step i − 1. Finally, in Step logn, only a single processor is used. While the overall work of all the processors together is not reduced relative to an equivalent sequential evaluation on a single processor, the total processing time, if one accounts only once for commands executed in parallel, is reduced from t = O(n) to t = O(logn). We call this the hierarchical method.
The following strategy could thus be applied. Partition the chunk to be processed into n blocks of k/n bytes each. For example, a chunk of 512 bytes could be split into n = 64 blocks of 8 bytes each. In a first stage which we call Step 0, a set of n processors is used to work simultaneously on the n blocks of the chunk. In Step 1, only n/2
processors are used, each acting on two blocks evaluated in the previous step, and in general in Step i, only n/2i processors are used, each acting on two blocks evaluated in the previous step i − 1. Finally, in Step logn, only a single processor is used. While the overall work of all the processors together is not reduced relative to an equivalent sequential evaluation on a single processor, the total processing time, if one accounts only once for commands executed in parallel, is reduced from t = O(n) to t = O(logn). We call this the hierarchical method.
การแปล กรุณารอสักครู่..
