Skip to content

Class generator_cossin

class generator_cossin<T, VecWidth> base

template <typename T, size_t VecWidth = internal::generator_width<T>(1)>
struct generator_cossin : public generator<T, VecWidth, generator_cossin<T, VecWidth>> { … }

Generator that produces interleaved cosine and sine values

\\[ x_i = \begin{cases} \cos(start + i \cdot step), & \text{if } i \text{ is even}\\ \sin(start + i \cdot step), & \text{otherwise} \end{cases} \\]

Template parameters
T Value type.
VecWidth Native vector width (must be even).

constructor generator_cossin<T, VecWidth>(T, T)

generator_cossin(T start, T step)

Constructs an interleaved cosine/sine generator.

Parameters
start Starting phase.
step Phase increment between successive values.

Fully qualified name: kfr::generator_cossin<T, VecWidth>::generator_cossin<T, VecWidth>(T, T)

function sync(T)

Reinitializes the generator so the next vector starts at phase start.

Parameters
start Starting phase.

Fully qualified name: kfr::generator_cossin<T, VecWidth>::sync(T)

function next()

Advances the rotation by one native vector width using the recurrence relation.

Fully qualified name: kfr::generator_cossin<T, VecWidth>::next()

variable step

T step

Fully qualified name: kfr::generator_cossin<T, VecWidth>::step

variable alpha

T alpha

Fully qualified name: kfr::generator_cossin<T, VecWidth>::alpha

variable beta

T beta

Fully qualified name: kfr::generator_cossin<T, VecWidth>::beta

function init_cossin(T, T)

Initializes a vector of interleaved cosine/sine pairs with angular frequency w and starting phase phase.

Parameters
w Angular frequency increment per sample.
phase Starting phase.
Returns
Vector of interleaved cosine and sine values.

Fully qualified name: kfr::generator_cossin<T, VecWidth>::init_cossin(T, T)

Fully qualified name: kfr::generator_cossin<T, VecWidth>

This file was generated by cxxdox, a C++ documentation generator based on MkDocs Material and libclang.