chsvlib
chsv helper source code

◆ make_matrix_parallelism_policy()

unspecified_type Chusov::Math::make_matrix_parallelism_policy ( const Chusov::Math::Matrix &...  matrices)

Retrieves a common parallelism policy for a set of matrices and, if the common policy is matrix_dynamically_customizable_parallelism, sets its parallelism flag to a value with respect to the rules for forming the common policy, as specified in the description of the common_policy metafunction. The returned type is unspecified and defined by the implementation.

Parameters
matricesA pack of matrices whose parallelism policies are to be unified into one.
Returns
A value of unspecified type which can be provided as an argument for the Matrix::SetParallelismPolicy method.

The method is indented to be used to form a common policy towards parallel execution of matrix routings in conjunction with the common_policy (for matrix policy) or std::common_type (for parallelism type markers) metafunction and with the Matrix::SetParallelismPolicy method.

One of the metafunctions is used to form a template instantiation of a matrix type, while the Matrix::SetParallelismPolicy method and the make_matrix_parallelism_policy function are used together to form a dynamic parallelism flag value (for the matrix_dynamically_customizable_parallelism common policy) or to do nothing but to act as dummy functions for statically defined parallelism policy.

Warning
It is preferable to call this function exploiting ADL because its namespace can be a changed.