Skip to main content

Plan

Struct Plan 

Source
pub struct Plan<T: Float> { /* private fields */ }
Expand description

A plan for executing FFT transforms.

Plans are created once and can be executed multiple times. The planning process may measure different algorithms to find the fastest.

Implementations§

Source§

impl<T: Float> Plan<T>

Source

pub fn dft_1d(n: usize, direction: Direction, flags: Flags) -> Option<Self>

Create a 1D complex-to-complex DFT plan.

§Arguments
  • n - Transform size
  • direction - Forward or Backward transform
  • flags - Planning flags (ESTIMATE, MEASURE, PATIENT, EXHAUSTIVE)
§Returns

A plan that can be executed on input/output buffers of size n.

Source

pub fn dft_2d( n0: usize, n1: usize, direction: Direction, flags: Flags, ) -> Option<Plan2D<T>>

Create a 2D complex-to-complex DFT plan.

Source

pub fn dft_3d( n0: usize, n1: usize, n2: usize, direction: Direction, flags: Flags, ) -> Option<Plan3D<T>>

Create a 3D complex-to-complex DFT plan.

Source

pub fn r2c_1d(n: usize, flags: Flags) -> Option<RealPlan<T>>

Create a 1D real-to-complex FFT plan.

Source

pub fn c2r_1d(n: usize, flags: Flags) -> Option<RealPlan<T>>

Create a 1D complex-to-real FFT plan.

Source

pub fn size(&self) -> usize

Get the transform size.

Source

pub fn direction(&self) -> Direction

Get the transform direction.

Source

pub fn execute(&self, input: &[Complex<T>], output: &mut [Complex<T>])

Execute the plan on the given input/output buffers.

§Panics

Panics if input or output buffer sizes don’t match the plan size.

Source

pub fn execute_inplace(&self, data: &mut [Complex<T>])

Execute the plan in-place.

§Panics

Panics if buffer size doesn’t match the plan size.

Trait Implementations§

Source§

impl<T: Float> Debug for Plan<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> Freeze for Plan<T>

§

impl<T> RefUnwindSafe for Plan<T>
where T: RefUnwindSafe,

§

impl<T> Send for Plan<T>

§

impl<T> Sync for Plan<T>

§

impl<T> Unpin for Plan<T>

§

impl<T> UnsafeUnpin for Plan<T>

§

impl<T> UnwindSafe for Plan<T>
where T: UnwindSafe,

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
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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.