Skip to main content

GpuPointToPlaneInput

Struct GpuPointToPlaneInput 

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

Reusable explicitly uploaded positions/tree and original-order target normals. A single common normal scale preserves relative raw-normal weights; normals are never normalized individually. Source positions remain immutable.

Implementations§

Source§

impl GpuPointToPlaneInput

Source

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

Uploads original source positions, target tree and original-order raw target normals. Normals must be finite; zero rows retain their zero weight. Nonzero components must remain normal f32 after common scaling. H2D payload is 16S + 48T + 32*M bytes (M = target tree nodes).

Source

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

Explicitly uses shared GPU gathering for target tree points/queries. Host payload is 16S + 32T + 32M bytes, compared with 16S + 48T + 32M for upload; device output bytes are 32T. Raw-normal validation/packing and common normal scale are unchanged. Source/geometry preparation remains on CPU. Two transient inputs add 16T GPU bytes; host target packing totaling 32*T payload bytes over construction is removed. No readback or completion wait is added. Placement is explicit; small inputs may be slower and existing device requirements apply. See GpuIcpInput::upload_with_gpu_gather.

Source

pub const fn upload_transfers(&self) -> TransferStats

All position/tree/normal payload uploaded at construction.

Source

pub fn source_count(&self) -> u32

Original source count.

Source

pub fn equations_resident( &self, runtime: &WgpuRuntime, transform: Isometry3<f32>, max_distance: f32, ) -> SpatialResult<GpuPointToPlaneNormalEquations>

Transforms originals, runs unbounded nearest matching then an inclusive Euclidean distance gate, and reduces centered/scaled Hessian/gradient and raw-normal point-to-plane squared fitness. Five passes share a submission; no payload transfer or host wait occurs. Transformed query storage is reused for rotation/residual rows after matching. Private scratch is 40S + 240min(ceil(S/64),256) bytes. f32 operations can change matches, weights, solutions and stopping relative to the existing CPU f64 path.

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,