pub struct CudaBuffer { /* private fields */ }Expand description
Column-oriented GPU buffer
Holds columnar data on the GPU with an associated schema.
Each column is stored as a separate CudaSlice<u8>.
Implementations§
Source§impl CudaBuffer
impl CudaBuffer
Sourcepub fn from_columns(
columns: Vec<CudaColumn>,
row_cap: u64,
d_num_rows: TrackedCudaSlice<u32>,
schema: Schema,
) -> Self
pub fn from_columns( columns: Vec<CudaColumn>, row_cap: u64, d_num_rows: TrackedCudaSlice<u32>, schema: Schema, ) -> Self
Sourcepub fn from_columns_with_host_count(
columns: Vec<CudaColumn>,
row_cap: u64,
d_num_rows: TrackedCudaSlice<u32>,
schema: Schema,
host_row_count: u32,
) -> Self
pub fn from_columns_with_host_count( columns: Vec<CudaColumn>, row_cap: u64, d_num_rows: TrackedCudaSlice<u32>, schema: Schema, host_row_count: u32, ) -> Self
Like from_columns, but eagerly populates the row-count cache.
Use when the host already knows the exact row count (e.g., buffer_from_columns).
Sourcepub fn cached_row_count(&self) -> Option<u32>
pub fn cached_row_count(&self) -> Option<u32>
Returns the cached row count if available (not sentinel u32::MAX).
Sourcepub fn canonical_full_row_set_certified(&self) -> bool
pub fn canonical_full_row_set_certified(&self) -> bool
Whether rows are sorted in schema-column order and full-row unique.
Sourcepub fn columns(&self) -> &[CudaColumn]
pub fn columns(&self) -> &[CudaColumn]
Borrow every column without permitting mutation of certified contents.
Sourcepub fn columns_mut(&mut self) -> &mut [CudaColumn]
pub fn columns_mut(&mut self) -> &mut [CudaColumn]
Mutably borrow columns after invalidating canonical-set metadata.
Sourcepub fn set_schema(&mut self, schema: Schema)
pub fn set_schema(&mut self, schema: Schema)
Replace the schema after invalidating canonical ordering metadata.
Sourcepub fn set_row_capacity(&mut self, row_cap: u64)
pub fn set_row_capacity(&mut self, row_cap: u64)
Set row capacity and invalidate all host-derived row metadata.
Sourcepub fn num_rows_device_mut(&mut self) -> &mut TrackedCudaSlice<u32>
pub fn num_rows_device_mut(&mut self) -> &mut TrackedCudaSlice<u32>
Mutably borrow the device row count after invalidating derived metadata.
Sourcepub fn num_rows_device(&self) -> &TrackedCudaSlice<u32>
pub fn num_rows_device(&self) -> &TrackedCudaSlice<u32>
Get the device-resident row count
Sourcepub fn estimated_bytes(&self) -> u64
pub fn estimated_bytes(&self) -> u64
Estimated memory usage in bytes
Sourcepub fn column(&self, index: usize) -> Option<&CudaColumn>
pub fn column(&self, index: usize) -> Option<&CudaColumn>
Get a reference to a specific column by index