chsvlib
chsv helper source code

◆ SetParallelismPolicy()

derived_type& SetParallelismPolicy ( unspecified_type  policy)
protected

Sets parallelism policy, and, for the dynamically customizable parallelism policy - a policy flag, as a result of unifying policies of two operands of the make_matrix_parallelism_policy function.

Parameters
policyis an unspecified policy marker returned by the make_matrix_parallelism_policy function.
Returns
A reference to a matrix object for which the policy is set.

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 make_matrix_parallelism_policy function.

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.

The rules of forming the common parallelism policy are specified in the documentation to the common_policy metafunction.