Server IP : 104.21.38.3 / Your IP : 162.158.88.80 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/server/mysql/src/boost/boost_1_59_0/boost/mpi/ |
Upload File : |
// Copyright (C) 2006 Douglas Gregor <doug.gregor -at- gmail.com>. // 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) /** @file status.hpp * * This header defines the class @c status, which reports on the * results of point-to-point communication. */ #ifndef BOOST_MPI_STATUS_HPP #define BOOST_MPI_STATUS_HPP #include <boost/mpi/config.hpp> #include <boost/optional.hpp> namespace boost { namespace mpi { class request; class communicator; /** @brief Contains information about a message that has been or can * be received. * * This structure contains status information about messages that * have been received (with @c communicator::recv) or can be received * (returned from @c communicator::probe or @c * communicator::iprobe). It permits access to the source of the * message, message tag, error code (rarely used), or the number of * elements that have been transmitted. */ class BOOST_MPI_DECL status { public: status() : m_count(-1) { } status(MPI_Status const& s) : m_status(s), m_count(-1) {} /** * Retrieve the source of the message. */ int source() const { return m_status.MPI_SOURCE; } /** * Retrieve the message tag. */ int tag() const { return m_status.MPI_TAG; } /** * Retrieve the error code. */ int error() const { return m_status.MPI_ERROR; } /** * Determine whether the communication associated with this object * has been successfully cancelled. */ bool cancelled() const; /** * Determines the number of elements of type @c T contained in the * message. The type @c T must have an associated data type, i.e., * @c is_mpi_datatype<T> must derive @c mpl::true_. In cases where * the type @c T does not match the transmitted type, this routine * will return an empty @c optional<int>. * * @returns the number of @c T elements in the message, if it can be * determined. */ template<typename T> optional<int> count() const; /** * References the underlying @c MPI_Status */ operator MPI_Status&() { return m_status; } /** * References the underlying @c MPI_Status */ operator const MPI_Status&() const { return m_status; } private: /** * INTERNAL ONLY */ template<typename T> optional<int> count_impl(mpl::true_) const; /** * INTERNAL ONLY */ template<typename T> optional<int> count_impl(mpl::false_) const; public: // friend templates are not portable /// INTERNAL ONLY mutable MPI_Status m_status; mutable int m_count; friend class communicator; friend class request; }; } } // end namespace boost::mpi #endif // BOOST_MPI_STATUS_HPP