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]

[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.

[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.

[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]

[src]

Formats the value using the given formatter. Read more

impl Drop for UnsafeUserOperation
[src]

[src]

Executes the destructor for this type. Read more

impl AsRaw for UnsafeUserOperation
[src]

The raw MPI C API type

[src]

The raw value

impl<'a> Operation for &'a UnsafeUserOperation
[src]

[src]

Returns whether the operation is commutative. Read more