Expand description
SIMD-accelerated operations using Trueno.
This module provides hardware-accelerated vector and matrix operations for the Presentar rendering pipeline.
When the simd feature is disabled, operations fall back to scalar
implementations.
§Example
use presentar_core::simd::{Vec4, Mat4, batch_transform_points};
use presentar_core::Point;
let transform = Mat4::identity();
let points = vec![Point::new(0.0, 0.0), Point::new(100.0, 100.0)];
let transformed = batch_transform_points(&points, &transform);Structs§
Functions§
- batch_
lerp_ points - Batch linear interpolation.
- batch_
mean_ f64 - SIMD-friendly mean of f64 values.
- batch_
min_ max_ f64 - SIMD-friendly min/max of f64 values.
- batch_
scale_ f64 - SIMD-friendly scale operation.
- batch_
scale_ offset_ f64 - SIMD-friendly scale and offset operation.
- batch_
stddev_ f64 - SIMD-friendly standard deviation.
- batch_
sum_ f64 - SIMD-friendly sum of f64 values.
- batch_
transform_ points - Batch transform multiple points.
- batch_
transform_ vec4 - Batch transform multiple Vec4s.
- batch_
variance_ f64 - SIMD-friendly variance calculation (population variance).
- bounding_
box - Axis-aligned bounding box from points.
- centroid
- Calculate the centroid of points.
- histogram_
f64 - Compute histogram bin counts for f64 data.
- normalize_
f64 - SIMD-friendly normalization to [0, 1] range.
- normalize_
with_ range_ f64 - SIMD-friendly normalization with provided range.
- percentile_
sorted_ f64 - SIMD-friendly percentile calculation.
- point_
in_ convex_ polygon - Check if a point is inside a convex polygon.
- polygon_
area - Compute the area of a polygon using the shoelace formula.
- weighted_
sum_ f64 - SIMD-friendly weighted sum.