mpi4py.MPI.memory
- class mpi4py.MPI.memory
Bases:
object
Memory buffer
Methods Summary
allocate
(nbytes[, clear])Memory allocation
fromaddress
(address, nbytes[, readonly])Memory from address and size in bytes
frombuffer
(obj[, readonly])Memory from buffer-like object
release
()Release the underlying buffer exposed by the memory object
tobytes
([order])Return the data in the buffer as a byte string
Return a readonly version of the memory object
Attributes Summary
Memory address
A string with the format of each element
The size in bytes of each element
Memory size (in bytes)
The underlying object of the memory
Boolean indicating whether the memory is read-only
Methods Documentation
- static allocate(nbytes, clear=False)
Memory allocation
- static fromaddress(address, nbytes, readonly=False)
Memory from address and size in bytes
- static frombuffer(obj, readonly=False)
Memory from buffer-like object
- tobytes(order=None)
Return the data in the buffer as a byte string
Attributes Documentation
- address
Memory address
- format
A string with the format of each element
- itemsize
The size in bytes of each element
- nbytes
Memory size (in bytes)
- obj
The underlying object of the memory
- readonly
Boolean indicating whether the memory is read-only