Skip to content

Commit a3c0b5a

Browse files
committed
Add native_handle to mplr::info
1 parent df7eee3 commit a3c0b5a

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

mplr/impl/info.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,15 @@ namespace mplr {
131131
return {};
132132
}
133133

134+
/// Gets the native MPI_Info handle.
135+
/// \return The native MPI_Info handle.
136+
/// \note This function returns a non-owning handle to the underlying MPI info.
137+
[[nodiscard]] MPI_Info native_handle() const {
138+
if (info_ == MPI_INFO_NULL)
139+
MPI_Info_create(&info_);
140+
return info_;
141+
}
142+
134143
friend class impl::base_communicator;
135144
friend class communicator;
136145
friend class file;

0 commit comments

Comments
 (0)