Spec WavefrontExecutionPolicy
Policy to select runtime execution mode for algorithms.

Extends ExecutionPolicy
All Extended ExecutionPolicy
Defined in <seqan/align_parallel.h>
Signature template<typename TWaveSpec, typename TVectorizationMode> struct ExecutionPolicy<WavefrontAlignment<TWaveSpec>, TVectorizationMode>;

Template Parameters

TWaveSpec Type specializing the wave-front threading model. Can be void (default) or BlockOffsetOptimization.
TVectorizationMode Type specifying the vectorization model. Can be Vectorial or Serial (default).

Interface Function Overview

Interface Functions Inherited From ExecutionPolicy

Interface Metafunction Overview

Interface Metafunctions Inherited From ExecutionPolicy

Member Variable Overview

Member Variables Inherited From ExecutionPolicy

Detailed Description

Special execution policy for computing sequence alignments with wave-front parallelization strategy. In the wave-front execution the DP matrix is partitioned into blocks which can be executed in parallel along the minor diagonal of the DP matrix. The execution policy can be further specialized if used in combination with the Vectorial execution mode (see WavefrontExecutionPolicy).

Vectorization

In the vectorization mode, the blocks are gathered into SIMD registers. The BlockOffsetOptimization can be used to always ensure that sizeof(SIMD) / 2 many blocks can be packed into one SIMD register. This requires, that the available instruction set supports 16 bit packed SIMD operations (e.g. SSE4, AVX2) and the score value type (Score) is bigger then 16 bit. In the default mode, the optimization is disabled and the number of packed alignment blocks is solely determined by the score value type passed to the algorithm as a parameter (e.g. see globalAlignmentScore).

Interface Functions Detail

size_t blockSize(exec);

Getter for the current block size.

Parameters

exec The wave-front execution policy to query.

Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

void parallelAlignments(exec);

Getter for the current number of alignments executed in parallel.

Parameters

exec The wave-front execution policy to update.

Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

void setBlockSize(exec, bs);

Setter for the current block size.

Parameters

exec The wave-front execution policy to update.
bs The new block size to set. Must be a positive integral number greater or equal than 5.

Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

void setParallelAlignments(exec, pa);

Setter for the current number of alignments executed in parallel.

Parameters

exec The wave-front execution policy to update.
pa The number of alignments to execute in parallel. Must be a positive integral number greater than 0.

Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

Member Variables Detail

size_t WavefrontExecutionPolicy::blockSize

The size of the blocks to use. Defaults to 100.

size_t WavefrontExecutionPolicy::parallelAlignments

Number of alignments scheduled concurrently. Defaults to std::thread::hardware_concurrency().