vello_cpu/fine/common/gradient/
linear.rs1use crate::fine::common::gradient::SimdGradientKind;
5use core::marker::PhantomData;
6use vello_common::encode::LinearKind;
7use vello_common::fearless_simd::{Simd, f32x8};
8
9#[derive(Debug)]
10pub(crate) struct SimdLinearKind<S: Simd> {
11 phantom_data: PhantomData<S>,
13}
14
15impl<S: Simd> SimdLinearKind<S> {
16 pub(crate) fn new(_: S, _: LinearKind) -> Self {
17 Self {
18 phantom_data: PhantomData,
19 }
20 }
21}
22
23impl<S: Simd> SimdGradientKind<S> for SimdLinearKind<S> {
24 #[inline(always)]
25 fn cur_pos(&self, x_pos: f32x8<S>, _: f32x8<S>) -> f32x8<S> {
26 x_pos
27 }
28}