Struct mpi::collective::UnsafeUserOperation
[−]
[src]
pub struct UnsafeUserOperation { /* fields omitted */ }An unsafe user-defined operation.
Unsafe user-defined operations are created from pointers to functions that have the unsafe
signatures of user functions defined in the MPI C bindings, UnsafeUserFunction.
The recommended way to create user-defined operations is through the safer UserOperation
type. This type can be used as a work-around in situations where the libffi dependency is not
available.
Methods
impl UnsafeUserOperation[src]
pub unsafe fn associative(function: UnsafeUserFunction) -> Self[src]
Define an unsafe operation using a function pointer. The operation must be associative.
This is a more readable shorthand for the new method. Refer to new for
more information.
pub unsafe fn commutative(function: UnsafeUserFunction) -> Self[src]
Define an unsafe operation using a function pointer. The operation must be both associative and commutative.
This is a more readable shorthand for the new method. Refer to new for
more information.
pub unsafe fn new(commute: bool, function: UnsafeUserFunction) -> Self[src]
Creates an associative and possibly commutative unsafe operation using a function pointer.
The function receives raw *mut c_void as invec and inoutvec and the number of elemnts
of those two vectors as a *mut c_int len. It shall set inoutvec
to the value of f(invec, inoutvec), where f is a binary associative operation.
If the operation is also commutative, setting commute to true may yield performance
benefits.
Note: The user function is not allowed to panic.
Standard section(s)
5.9.5
Trait Implementations
impl Debug for UnsafeUserOperation[src]
fn fmt(&self, f: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl Drop for UnsafeUserOperation[src]
impl AsRaw for UnsafeUserOperation[src]
impl<'a> Operation for &'a UnsafeUserOperation[src]
fn is_commutative(&self) -> bool[src]
Returns whether the operation is commutative. Read more