Boost C++ 库

...世界上最受推崇、设计最精良的 C++ 库项目之一。 Herb SutterAndrei Alexandrescu, C++ Coding Standards

结构体模板 is_commutative - Boost C++ 函数库
PrevUpHomeNext

结构体模板 is_commutative

boost::mpi::is_commutative — 确定函数对象类型是否可交换。

提要

// In header: <boost/mpi/operations.hpp>

template<typename Op, typename T> 
struct is_commutative : public mpl::false_ {
};

描述

该特性用于确定操作 Op 应用于类型 T 的值时是否可交换。像 reduceprefix_sum 这样的并行操作,如果操作是可交换的,可以更有效地实现。为了将一个操作标记为可交换,用户应该特化 is_commutative 并从类 mpl::true_ 派生。


PrevUpHomeNext