pub struct CudaBuffer {
pub columns: Vec<CudaColumn>,
pub row_cap: u64,
pub d_num_rows: TrackedCudaSlice<u32>,
pub schema: Schema,
/* 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>.
Fields§
§columns: Vec<CudaColumn>Column data stored as raw bytes
row_cap: u64Row capacity for allocated columns
d_num_rows: TrackedCudaSlice<u32>Device-resident row count (len = 1)
schema: SchemaSchema describing the column types
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 set_cached_row_count_if_unset(&self, count: u32)
pub fn set_cached_row_count_if_unset(&self, count: u32)
Sets the cached row count if not already set (CAS from sentinel). No-op if already cached.
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
Auto Trait Implementations§
impl !Freeze for CudaBuffer
impl RefUnwindSafe for CudaBuffer
impl Send for CudaBuffer
impl Sync for CudaBuffer
impl Unpin for CudaBuffer
impl UnsafeUnpin for CudaBuffer
impl UnwindSafe for CudaBuffer
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