[Numpy-discussion] FIFO/circular buffer class in Numeric?

RayS rays at blue-cove.com
Mon Nov 14 08:15:59 CST 2005


Has anyone implemented a fast, generic circular array buffer in 
Numpy? I didn't see one in the usual searches, but I don't want to 
re-invent one either. I did see a number of C implementations like
http://www.codeproject.com/csharp/circularbuffer.asp
(http://www.gois.ws/files/attach/200209/200209201850040.zip)
which could be weave'd, I suppose.
I have some previous implementations I've used, but what I had in 
mind was making a new FIFO class with attributes of address, 
state<None,reading,writing>, pointer, size etc., and methods like 
flush (if I implement it as a memmap) and other things, like queue has.

The important part of the idea is that multiple threads and processes 
could fully access it. Currently, I will have an ADC process fill it, 
and other processes use it.

I'll post code as I go, in any case.
Ray





More information about the Numpy-discussion mailing list