Int Buffer¶
-
class
pyogmaneo.IntBuffer¶
A buffer of integers (int32). Used typically to hold CSDRs for transfering to and from the GPU/other device.
-
IntBuffer.__init__(self)¶ Default initialize, does nothing
-
IntBuffer.__init__(self, cs, size) Create a buffer of a certain size (number of integers). Calls IntBuffer.create internally.
Parameters: - cs – (ComputeSystem) compute system to use
- size – (int32) size of buffer (number of integers)
-
IntBuffer.create(self, cs, size)¶ Create a buffer of a certain size (number of integers). Will override existing data if already has some.
Parameters: - cs – (ComputeSystem) compute system to use
- size – (int32) size of buffer (number of integers)
-
IntBuffer.write(self, cs, data)¶ Write data to the integer buffer.
Parameters: - cs – (ComputeSystem) compute system to use
- data – ([int32]) list of integers to write. Must be the same size as the buffer was created with
-
IntBuffer.read(self, cs)¶ Read data from the integer buffer.
Parameters: cs – (ComputeSystem) compute system to use Return type: ([int32]) list of integers
-
IntBuffer.getSize(self)¶ Get the size of the buffer (number of integers)
Return type: (int32) size