pub struct PirBatch {
pub node_type: Vec<u8>,
pub leaf_id: Vec<u32>,
pub decision_var: Vec<u32>,
pub decision_child_false: Vec<u32>,
pub decision_child_true: Vec<u32>,
pub child_offsets: Vec<u32>,
pub children: Vec<u32>,
}Expand description
Host-side PIR batch (for tests and host-driven workflows).
Fields§
§node_type: Vec<u8>Opcode for every candidate node.
leaf_id: Vec<u32>Leaf identifier for every candidate literal node.
decision_var: Vec<u32>Choice-variable identifier for every candidate decision node.
decision_child_false: Vec<u32>False-branch child for every candidate decision node.
decision_child_true: Vec<u32>True-branch child for every candidate decision node.
child_offsets: Vec<u32>CSR offsets into Self::children.
children: Vec<u32>Flattened child identifiers.
Implementations§
Source§impl PirBatch
impl PirBatch
Sourcepub fn and_or_batch(children: Vec<Vec<u32>>) -> Self
pub fn and_or_batch(children: Vec<Vec<u32>>) -> Self
Build a batch of AND nodes with the given child lists.
This helper is primarily used by tests.
Sourcepub fn to_device(
&self,
provider: &Arc<CudaKernelProvider>,
) -> Result<GpuPirBatch>
pub fn to_device( &self, provider: &Arc<CudaKernelProvider>, ) -> Result<GpuPirBatch>
Validates the batch layout and uploads it to the device.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PirBatch
impl RefUnwindSafe for PirBatch
impl Send for PirBatch
impl Sync for PirBatch
impl Unpin for PirBatch
impl UnsafeUnpin for PirBatch
impl UnwindSafe for PirBatch
Blanket Implementations§
impl<T> Allocation for T
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