Skip to main content

GpuFpfhInput

Struct GpuFpfhInput 

Source
pub struct GpuFpfhInput { /* private fields */ }
Expand description

Explicitly uploaded FPFH positions/unit normals and their GPU KD-tree/query batch. Original point order is retained; CPU tree construction is external. All subsequent neighborhood and descriptor computation stays on GPU.

Implementations§

Source§

impl GpuFpfhInput

Source

pub fn upload( runtime: &WgpuRuntime, tree: &KdTree, normals: &[[f32; 3]], ) -> SpatialResult<Self>

Uploads a CPU KD-tree and matching original-order finite unit normals. Payload is 64 bytes per point plus 32 per tree node (samples, original queries and KD-tree points/nodes). No readback is performed. Coordinate extents must have a finite f32 squared length, as in CPU FPFH.

Source

pub fn upload_with_gpu_gather( runtime: &WgpuRuntime, tree: &KdTree, normals: &[[f32; 3]], ) -> SpatialResult<Self>

Explicitly generates tree points, original-order queries and padded position/normal samples using integer copies. Below 1,048,576 points, one pass generates all three outputs; larger inputs retain two passes. Host payload is 28N + 32M bytes (axes, indices, raw normals and nodes), compared with 64N + 32M for upload. Device output bytes are 64N, with no readback or completion wait. CPU partitioning, validation and node staging remain. Removes host packing allocations totaling 64N payload bytes over construction; fused inputs use two transient buffers totaling 28N bytes, while the large two-pass path uses up to 28N beside owned outputs. Small inputs may be slower than default upload; placement is explicit and existing FPFH device requirements apply.

Source

pub const fn point_count(&self) -> u32

Original point/descriptor count.

Source

pub const fn upload_transfers(&self) -> TransferStats

Payload bytes explicitly transferred at construction, including device output bytes when the GPU gather constructor is selected.

Source

pub fn radius_neighborhoods_resident( &self, runtime: &WgpuRuntime, radius: f32, capacity: u32, ) -> SpatialResult<GpuFpfhNeighborhoods>

Builds reusable GPU radius neighborhoods for this input, including self. No readback or host wait occurs. All matches are counted; capacity overflow is checked on GPU during descriptor computation and at download.

Source

pub fn descriptors_resident( &self, runtime: &WgpuRuntime, neighbors: &GpuFpfhNeighborhoods, ) -> SpatialResult<GpuFpfhDescriptors>

Computes GPU SPFH and distance-weighted FPFH using resident neighborhoods from this exact input. Both passes share one submission; results remain on device. Overflow/malformed rows poison the entire output to zero and set status; download rejects that output, and GPU consumers must check status before using it. No automatic CPU fallback or payload copy occurs. GPU angular/bin rounding may differ from CPU near boundaries.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,