// Copyright (C) 2005-2006 Douglas Gregor // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // A test of the is_mpi_op functionality. #include #include #include #include using namespace boost::mpi; using namespace std; using boost::is_base_and_derived; int test_main(int argc, char* argv[]) { boost::mpi::environment env(argc, argv); // Check each predefined MPI_Op type that we support directly. BOOST_CHECK((is_mpi_op, int>::op() == MPI_MAX)); BOOST_CHECK((is_mpi_op, float>::op() == MPI_MIN)); BOOST_CHECK((is_mpi_op, double>::op() == MPI_SUM)); BOOST_CHECK((is_mpi_op, long>::op() == MPI_PROD)); BOOST_CHECK((is_mpi_op, int>::op() == MPI_LAND)); BOOST_CHECK((is_mpi_op, int>::op() == MPI_BAND)); BOOST_CHECK((is_mpi_op, int>::op() == MPI_LOR)); BOOST_CHECK((is_mpi_op, int>::op() == MPI_BOR)); BOOST_CHECK((is_mpi_op, int>::op() == MPI_LXOR)); BOOST_CHECK((is_mpi_op, int>::op() == MPI_BXOR)); return 0; }