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