pub struct SoftGpuQueue {
pub handle: PackedHandle,
pub agent_handle: PackedHandle,
pub id: u64,
pub abi: Box<HsaQueueAbi>,
pub packet_buffer: *mut u8,
pub packet_bytes: usize,
pub doorbell: PackedHandle,
pub write_index: AtomicU64,
pub read_index: AtomicU64,
pub doorbell_stores: AtomicU64,
pub observed_through: AtomicU64,
/* private fields */
}Fields§
§handle: PackedHandle§agent_handle: PackedHandle§id: u64§abi: Box<HsaQueueAbi>§packet_buffer: *mut u8§packet_bytes: usize§doorbell: PackedHandle§write_index: AtomicU64§read_index: AtomicU64§doorbell_stores: AtomicU64§observed_through: AtomicU64SoftGPU observe cursor (mirrors processor progress with read_index in Phase 4).
Implementations§
Source§impl SoftGpuQueue
impl SoftGpuQueue
pub fn new( handle: PackedHandle, agent_handle: PackedHandle, id: u64, abi: Box<HsaQueueAbi>, packet_buffer: *mut u8, packet_bytes: usize, doorbell: PackedHandle, ) -> Self
pub fn size_packets(&self) -> u64
pub fn write_index(&self) -> u64
pub fn read_index(&self) -> u64
pub fn observed_through(&self) -> u64
pub fn store_write_index(&self, value: u64)
pub fn store_read_index(&self, value: u64)
pub fn note_doorbell_store(&self)
pub fn doorbell_store_count(&self) -> u64
pub fn abi_ptr(&self) -> *mut HsaQueueAbi
pub fn packet_bytes_at( &self, packet_index: u64, ) -> Result<[u8; 64], PacketValidateError>
Sourcepub fn write_packet_type(&self, packet_index: u64, packet_type: u16)
pub fn write_packet_type(&self, packet_index: u64, packet_type: u16)
Write a packet header type into the ring (test / SoftGPU producer helper).
Sourcepub fn write_packet_bytes(&self, packet_index: u64, bytes: &[u8; 64])
pub fn write_packet_bytes(&self, packet_index: u64, bytes: &[u8; 64])
Copy full packet bytes into the ring slot (SoftGPU / test producer).
Sourcepub fn invalidate_packet_slot(&self, packet_index: u64)
pub fn invalidate_packet_slot(&self, packet_index: u64)
Mark slot INVALID after SoftGPU consumed it (protocol progress).
Sourcepub fn observe_packets(
&self,
) -> Result<Vec<PacketObservation>, PacketValidateError>
pub fn observe_packets( &self, ) -> Result<Vec<PacketObservation>, PacketValidateError>
Observe newly submitted packets exactly once. Copies bytes for Phase 4 parse.
pub fn observed_count(&self) -> usize
Trait Implementations§
Source§impl Debug for SoftGpuQueue
impl Debug for SoftGpuQueue
impl Send for SoftGpuQueue
Auto Trait Implementations§
impl !Freeze for SoftGpuQueue
impl !Sync for SoftGpuQueue
impl RefUnwindSafe for SoftGpuQueue
impl Unpin for SoftGpuQueue
impl UnsafeUnpin for SoftGpuQueue
impl UnwindSafe for SoftGpuQueue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more