Module simd

Module simd 

Source
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§

Mat4
4x4 matrix for transforms.
Vec4
4-component vector for SIMD operations.

Functions§

batch_add_simd
SIMD-accelerated batch add using trueno.
batch_dot_product
SIMD-accelerated batch dot product.
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).
best_backend
Get the best available SIMD backend.
bounding_box
Axis-aligned bounding box from points.
centroid
Calculate the centroid of points.
dot_simd
SIMD-accelerated dot product using trueno.
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.
scale_simd
SIMD-accelerated scale using trueno.
simd_to_vec4
Create Vec4 from SIMD vector.
vec4_to_simd
Create a SIMD-backed vector from Vec4.
weighted_sum_f64
SIMD-friendly weighted sum.

Type Aliases§

SimdVectorF32
SIMD vector type from trueno (f32).