STLdoc
STLdocumentation
|
The affinity_partitioner
class is similar to the static_partitioner
class, but it improves cache affinity by its choice of mapping subranges to worker threads. It can improve performance significantly when a loop is re-executed over the same data set, and the data fits in cache. Note that the same affinity_partitioner
object must be used with subsequent iterations of a parallel loop that is executed over a particular data set, to benefit from data locality.
More...
#include <ppl.h>
Public Member Functions | |
affinity_partitioner () | |
Constructs an affinity_partitioner object. More... | |
~affinity_partitioner () | |
Destroys an affinity_partitioner object. More... | |
location & | _Get_chunk_location (unsigned int _ChunkIndex) |
template<class _Type > | |
_Type | _Get_num_chunks (_Type) |
Private Member Functions | |
void | _Initialize_locations (unsigned int _Num_chunks) |
Private Attributes | |
unsigned int | _M_num_chunks |
location * | _M_pChunk_locations |
The affinity_partitioner
class is similar to the static_partitioner
class, but it improves cache affinity by its choice of mapping subranges to worker threads. It can improve performance significantly when a loop is re-executed over the same data set, and the data fits in cache. Note that the same affinity_partitioner
object must be used with subsequent iterations of a parallel loop that is executed over a particular data set, to benefit from data locality.
|
inline |
Constructs an affinity_partitioner
object.
|
inline |
Destroys an affinity_partitioner
object.
|
inlineprivate |
|
private |
|
private |