dotprod_rrrf

Vector dot product operation

Variants: dotprod_cccf, dotprod_crcf, dotprod_rrrf

Public Functions

int dotprod_rrrf_run(float * _v, float * _x, unsigned int _n, float * _y)
int dotprod_rrrf_run4(float * _v, float * _x, unsigned int _n, float * _y)
dotprod_rrrf dotprod_rrrf_create(float * _v, unsigned int _n)
dotprod_rrrf dotprod_rrrf_create_rev(float * _v, unsigned int _n)
dotprod_rrrf dotprod_rrrf_recreate(dotprod_rrrf _q, float * _v, unsigned int _n)
dotprod_rrrf dotprod_rrrf_recreate_rev(dotprod_rrrf _q, float * _v, unsigned int _n)
dotprod_rrrf dotprod_rrrf_copy(dotprod_rrrf _q)
int dotprod_rrrf_destroy(dotprod_rrrf _q)
int dotprod_rrrf_print(dotprod_rrrf _q)
int dotprod_rrrf_execute(dotprod_rrrf _q, float * _x, float * _y)

Interfaces

int dotprod_rrrf_run(float * _v, float * _x, unsigned int _n, float * _y)

Run dot product without creating object. This is less efficient than creating the object as it is an unoptimized portable implementation that doesn't take advantage of processor extensions. It is meant to provide a baseline for performance comparison and a convenient way to invoke a dot product operation when fast operation is not necessary.

  • _v : coefficients array, shape: (_n, 1)
  • _x : input array, shape: (_n, 1)
  • _n : dotprod length, 0 < _n
  • _y : output sample pointer

int dotprod_rrrf_run4(float * _v, float * _x, unsigned int _n, float * _y)

This provides the same unoptimized operation as the 'run()' method above, but with the loop unrolled by a factor of 4. It is marginally faster than 'run()' without unrolling the loop.

  • _v : coefficients array, shape: (_n, 1)
  • _x : input array, shape: (_n, 1)
  • _n : dotprod length, 0 < _n
  • _y : output sample pointer

dotprod_rrrf dotprod_rrrf_create(float * _v, unsigned int _n)

Create vector dot product object

  • _v : coefficients array, shape: (_n, 1)
  • _n : dotprod length, 0 < _n

dotprod_rrrf dotprod_rrrf_create_rev(float * _v, unsigned int _n)

Create vector dot product object with time-reversed coefficients

  • _v : time-reversed coefficients array, shape: (_n, 1)
  • _n : dotprod length, 0 < _n

dotprod_rrrf dotprod_rrrf_recreate(dotprod_rrrf _q, float * _v, unsigned int _n)

Re-create dot product object of potentially a different length with different coefficients. If the length of the dot product object does not change, no memory reallocation is invoked.

  • _q : old dotprod object
  • _v : coefficients array, shape: (_n, 1)
  • _n : dotprod length, 0 < _n

dotprod_rrrf dotprod_rrrf_recreate_rev(dotprod_rrrf _q, float * _v, unsigned int _n)

Re-create dot product object of potentially a different length with different coefficients. If the length of the dot product object does not change, no memory reallocation is invoked. Filter coefficients are stored in reverse order.

  • _q : old dotprod object
  • _v : time-reversed coefficients array, shape: (_n, 1)
  • _n : dotprod length, 0 < _n

dotprod_rrrf dotprod_rrrf_copy(dotprod_rrrf _q)

Copy object including all internal objects and state

int dotprod_rrrf_destroy(dotprod_rrrf _q)

Destroy dotprod object, freeing all internal memory

int dotprod_rrrf_print(dotprod_rrrf _q)

Print dotprod object internals to standard output

int dotprod_rrrf_execute(dotprod_rrrf _q, float * _x, float * _y)

Execute dot product on an input array

  • _q : dotprod object
  • _x : input array, shape: (_n, 1)
  • _y : output sample pointer