xtructure.queue package
Submodules
xtructure.queue.queue module
- class xtructure.queue.queue.Queue(max_size: int, val_store: Xtructurable, head: uint32, tail: uint32)[source]
Bases:
objectA JAX-compatible batched Queue data structure. Optimized for parallel operations on GPU using JAX.
- max_size
Maximum number of elements the queue can hold.
- Type:
int
- val_store
Array storing the values in the queue.
- head
Index of the first item in the queue.
- Type:
jax.numpy.uint32
- tail
Index of the next available slot.
- Type:
jax.numpy.uint32
- static build(max_size: int, value_class: Xtructurable)[source]
Creates a new Queue instance.
- enqueue(items: Xtructurable)[source]
Enqueues a number of items into the queue.
- from_tuple()
- head: uint32
- max_size: int
- replace(**kwargs)
- property size
- tail: uint32
- to_tuple()
- val_store: Xtructurable
Module contents
- class xtructure.queue.Queue(max_size: int, val_store: Xtructurable, head: uint32, tail: uint32)[source]
Bases:
objectA JAX-compatible batched Queue data structure. Optimized for parallel operations on GPU using JAX.
- max_size
Maximum number of elements the queue can hold.
- Type:
int
- val_store
Array storing the values in the queue.
- head
Index of the first item in the queue.
- Type:
jax.numpy.uint32
- tail
Index of the next available slot.
- Type:
jax.numpy.uint32
- static build(max_size: int, value_class: Xtructurable)[source]
Creates a new Queue instance.
- enqueue(items: Xtructurable)[source]
Enqueues a number of items into the queue.
- from_tuple()
- head: uint32
- max_size: int
- replace(**kwargs)
- property size
- tail: uint32
- to_tuple()
- val_store: Xtructurable