mpi4py.MPI.Datatype
- class mpi4py.MPI.Datatype(datatype=None)
Bases:
object
Datatype object
Methods Summary
Commit
()Commit the datatype
Create_contiguous
(count)Create a contiguous datatype
Create_darray
(size, rank, gsizes, distribs, ...)Create a datatype representing an HPF-like distributed array on Cartesian process grids
Create_f90_complex
(p, r)Return a bounded complex datatype
Return a bounded integer datatype
Create_f90_real
(p, r)Return a bounded real datatype
Create_hindexed
(blocklengths, displacements)Create an indexed datatype with displacements in bytes
Create_hindexed_block
(blocklength, displacements)Create an indexed datatype with constant-sized blocks and displacements in bytes
Create_hvector
(count, blocklength, stride)Create a vector (strided) datatype
Create_indexed
(blocklengths, displacements)Create an indexed datatype
Create_indexed_block
(blocklength, displacements)Create an indexed datatype with constant-sized blocks
Create_keyval
([copy_fn, delete_fn, nopython])Create a new attribute key for datatypes
Create_resized
(lb, extent)Create a datatype with a new lower bound and extent
Create_struct
(blocklengths, displacements, ...)Create an datatype from a general set of block sizes, displacements and datatypes
Create_subarray
(sizes, subsizes, starts[, order])Create a datatype for a subarray of a regular, multidimensional array
Create_vector
(count, blocklength, stride)Create a vector (strided) datatype
Delete_attr
(keyval)Delete attribute value associated with a key
Dup
()Duplicate a datatype
Free
()Free the datatype
Free_keyval
(keyval)Free an attribute key for datatypes
Get_attr
(keyval)Retrieve attribute value by key
Retrieve the actual arguments used in the call that created a datatype
Return information on the number and type of input arguments used in the call that created a datatype
Return lower bound and extent of datatype
Get_name
()Get the print name for this datatype
Get_size
()Return the number of bytes occupied by entries in the datatype
Return the true lower bound and extent of a datatype
Match_size
(typeclass, size)Find a datatype matching a specified size in bytes
Pack
(inbuf, outbuf, position, comm)Pack into contiguous memory according to datatype.
Pack_external
(datarep, inbuf, outbuf, position)Pack into contiguous memory according to datatype, using a portable data representation (external32).
Pack_external_size
(datarep, count)Return the upper bound on the amount of space (in bytes) needed to pack a message according to datatype, using a portable data representation (external32).
Pack_size
(count, comm)Return the upper bound on the amount of space (in bytes) needed to pack a message according to datatype.
Set_attr
(keyval, attrval)Store attribute value associated with a key
Set_name
(name)Set the print name for this datatype
Unpack
(inbuf, position, outbuf, comm)Unpack from contiguous memory according to datatype.
Unpack_external
(datarep, inbuf, position, outbuf)Unpack from contiguous memory according to datatype, using a portable data representation (external32).
decode
()Convenience method for decoding a datatype
f2py
(arg)py2f
()Attributes Summary
datatype combiner
datatype contents
datatype envelope
is a named datatype
is a predefined datatype
lower bound
datatype name
true extent
true lower bound
true upper bound
upper bound
Methods Documentation
- Create_contiguous(count)
Create a contiguous datatype
- Create_darray(size, rank, gsizes, distribs, dargs, psizes, order=ORDER_C)
Create a datatype representing an HPF-like distributed array on Cartesian process grids
- classmethod Create_f90_complex(p, r)
Return a bounded complex datatype
- classmethod Create_f90_integer(r)
Return a bounded integer datatype
- classmethod Create_f90_real(p, r)
Return a bounded real datatype
- Create_hindexed(blocklengths, displacements)
Create an indexed datatype with displacements in bytes
- Create_hindexed_block(blocklength, displacements)
Create an indexed datatype with constant-sized blocks and displacements in bytes
- Create_hvector(count, blocklength, stride)
Create a vector (strided) datatype
- Create_indexed(blocklengths, displacements)
Create an indexed datatype
- Create_indexed_block(blocklength, displacements)
Create an indexed datatype with constant-sized blocks
- classmethod Create_keyval(copy_fn=None, delete_fn=None, nopython=False)
Create a new attribute key for datatypes
- Create_resized(lb, extent)
Create a datatype with a new lower bound and extent
- classmethod Create_struct(blocklengths, displacements, datatypes)
Create an datatype from a general set of block sizes, displacements and datatypes
- Create_subarray(sizes, subsizes, starts, order=ORDER_C)
Create a datatype for a subarray of a regular, multidimensional array
- Create_vector(count, blocklength, stride)
Create a vector (strided) datatype
- Delete_attr(keyval)
Delete attribute value associated with a key
- classmethod Free_keyval(keyval)
Free an attribute key for datatypes
- Get_attr(keyval)
Retrieve attribute value by key
- Get_contents()
Retrieve the actual arguments used in the call that created a datatype
- Get_envelope()
Return information on the number and type of input arguments used in the call that created a datatype
- classmethod Match_size(typeclass, size)
Find a datatype matching a specified size in bytes
- Pack(inbuf, outbuf, position, comm)
Pack into contiguous memory according to datatype.
- Pack_external(datarep, inbuf, outbuf, position)
Pack into contiguous memory according to datatype, using a portable data representation (external32).
- Pack_external_size(datarep, count)
Return the upper bound on the amount of space (in bytes) needed to pack a message according to datatype, using a portable data representation (external32).
- Pack_size(count, comm)
Return the upper bound on the amount of space (in bytes) needed to pack a message according to datatype.
- Set_attr(keyval, attrval)
Store attribute value associated with a key
- Unpack(inbuf, position, outbuf, comm)
Unpack from contiguous memory according to datatype.
- Unpack_external(datarep, inbuf, position, outbuf)
Unpack from contiguous memory according to datatype, using a portable data representation (external32).
- decode()
Convenience method for decoding a datatype
Attributes Documentation
- combiner
datatype combiner
- contents
datatype contents
- envelope
datatype envelope
- extent
- is_named
is a named datatype
- is_predefined
is a predefined datatype
- lb
lower bound
- name
datatype name
- size
- true_extent
true extent
- true_lb
true lower bound
- true_ub
true upper bound
- ub
upper bound