mpi4py.MPI.memory

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

# Class memory

Memory buffer

Instance Methods | [hide private]
__delitem__(y) del x[y] |
__getitem__(y) x[y] |
__len__() len(x) |
a new object with type S, a subtype of T |
__new__(S, ...) |
__setitem__(i, y) x[i]=y |
None |
release(self) Release the underlying buffer exposed by the memory object |
bytes |
tobytes(self, order: Optionalstr=... = None) Return the data in the buffer as a byte string |
memory |
toreadonly(self) Return a readonly version of the memory object |
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__init__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Static Methods | [hide private]
memory |
allocate(nbytes: int, clear: bool= False) Memory allocation |
memory |
fromaddress(address: int, nbytes: int, readonly: bool= False) Memory from address and size in bytes |
memory |
frombuffer(obj: Buffer, readonly: bool= False) Memory from buffer-like object |

Properties | [hide private]
| address memory.address: int Memory address
| format memory.format: str A string with the format of each element
| itemsize memory.itemsize: int The size in bytes of each element
| nbytes memory.nbytes: int Memory size (in bytes)
| obj memory.obj: Optional[Buffer] The underlying object of the memory
| readonly memory.readonly: bool Boolean indicating whether the memory is read-only
Inherited from `object`: `__class__`

Method Details | [hide private]

### __new__(S, ...) |
Returns: a new object with type S, a subtype of T Overrides: object.__new__