Package mpi4py :: Module MPI :: Class Datatype
[hide private]
[frames] | no frames]

Class Datatype


Datatype object
Instance Methods [hide private]
Datatype
Commit(self)
Commit the datatype
Datatype
Create_contiguous(self, count: int)
Create a contiguous datatype
Datatype
Create_darray(self, size: int, rank: int, gsizes: Sequenceint=..., distribs: Sequenceint=..., dargs: Sequenceint=..., psizes: Sequenceint=..., order: int= ORDER_C)
Create a datatype representing an HPF-like distributed array on Cartesian process grids
Datatype
Create_dup(self)
Duplicate a datatype
Datatype
Create_f90_complex(cls, p: int, r: int)
Return a bounded complex datatype
Datatype
Create_f90_integer(cls, r: int)
Return a bounded integer datatype
Datatype
Create_f90_real(cls, p: int, r: int)
Return a bounded real datatype
Datatype
Create_hindexed(self, blocklengths: Sequenceint=..., displacements: Sequenceint=...)
Create an indexed datatype with displacements in bytes
Datatype
Create_hindexed_block(self, blocklength: int, displacements: Sequenceint=...)
Create an indexed datatype with constant-sized blocks and displacements in bytes
Datatype
Create_hvector(self, count: int, blocklength: int, stride: int)
Create a vector (strided) datatype
Datatype
Create_indexed(self, blocklengths: Sequenceint=..., displacements: Sequenceint=...)
Create an indexed datatype
Datatype
Create_indexed_block(self, blocklength: int, displacements: Sequenceint=...)
Create an indexed datatype with constant-sized blocks
int
Create_keyval(cls, copy_fn: OptionalCallableDatatype=...=..., int=...=..., Any=...=..., Any=... = None, delete_fn: OptionalCallableDatatype=...=..., int=...=..., Any=...=..., None=... = None, nopython: bool= False)
Create a new attribute key for datatypes
Datatype
Create_resized(self, lb: int, extent: int)
Create a datatype with a new lower bound and extent
Datatype
Create_struct(cls, blocklengths: Sequenceint=..., displacements: Sequenceint=..., datatypes: SequenceDatatype=...)
Create an datatype from a general set of block sizes, displacements and datatypes
Datatype
Create_subarray(self, sizes: Sequenceint=..., subsizes: Sequenceint=..., starts: Sequenceint=..., order: int= ORDER_C)
Create a datatype for a subarray of a regular, multidimensional array
Datatype
Create_vector(self, count: int, blocklength: int, stride: int)
Create a vector (strided) datatype
None
Delete_attr(self, keyval: int)
Delete attribute value associated with a key
Datatype
Dup(self)
Duplicate a datatype
None
Free(self)
Free the datatype
int
Free_keyval(cls, keyval: int)
Free an attribute key for datatypes
Optional[Union[int, Any]]
Get_attr(self, keyval: int)
Retrieve attribute value by key
Tuple[List[int], List[int], List[Datatype]]
Get_contents(self)
Retrieve the actual arguments used in the call that created a datatype
Tuple[int, int, int, int]
Get_envelope(self)
Return information on the number and type of input arguments used in the call that created a datatype
Tuple[int, int]
Get_extent(self)
Return lower bound and extent of datatype
str
Get_name(self)
Get the print name for this datatype
int
Get_size(self)
Return the number of bytes occupied by entries in the datatype
Tuple[int, int]
Get_true_extent(self)
Return the true lower bound and extent of a datatype
Datatype
Match_size(cls, typeclass: int, size: int)
Find a datatype matching a specified size in bytes
int
Pack(self, inbuf: BufSpec, outbuf: BufSpec, position: int, comm: Comm)
Pack into contiguous memory according to datatype.
int
Pack_external(self, datarep: str, inbuf: BufSpec, outbuf: BufSpec, position: int)
Pack into contiguous memory according to datatype, using a portable data representation (external32).
int
Pack_external_size(self, datarep: str, count: int)
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).
int
Pack_size(self, count: int, comm: Comm)
Return the upper bound on the amount of space (in bytes) needed to pack a message according to datatype.
Datatype
Resized(self, lb: int, extent: int)
Create a datatype with a new lower bound and extent
None
Set_attr(self, keyval: int, attrval: Any)
Store attribute value associated with a key
None
Set_name(self, name: str)
Set the print name for this datatype
int
Unpack(self, inbuf: BufSpec, position: int, outbuf: BufSpec, comm: Comm)
Unpack from contiguous memory according to datatype.
int
Unpack_external(self, datarep: str, inbuf: BufSpec, position: int, outbuf: BufSpec)
Unpack from contiguous memory according to datatype, using a portable data representation (external32).
 
__eq__(y)
x==y
 
__ge__(y)
x>=y
 
__gt__(y)
x>y
 
__le__(y)
x<=y
 
__lt__(y)
x<y
 
__ne__(y)
x!=y
a new object with type S, a subtype of T
__new__(S, ...)
 
__nonzero__()
x != 0
Tuple[Datatype, str, Dict[str, Any]]
decode(self)
Convenience method for decoding a datatype
Datatype
f2py(cls, arg: int)
int
py2f(self)

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  combiner
Datatype.combiner: int datatype combiner
  contents
Datatype.contents: Tuple[List[int], List[int], List[Datatype]] datatype contents
  envelope
Datatype.envelope: Tuple[int, int, int, int] datatype envelope
  extent
Datatype.extent: int extent
  is_named
Datatype.is_named: bool is a named datatype
  is_predefined
Datatype.is_predefined: bool is a predefined datatype
  lb
Datatype.lb: int lower bound
  name
Datatype.name: str datatype name
  size
Datatype.size: int size (in bytes)
  true_extent
Datatype.true_extent: int true extent
  true_lb
Datatype.true_lb: int true lower bound
  true_ub
Datatype.true_ub: int true upper bound
  ub
Datatype.ub: int upper bound

Inherited from object: __class__

Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__