libosmodsp 0.4.0.8-9128
Osmocom DSP library
Complex vectors

Modules

 Complex vectors math and signal processing
 

Files

file  cxvec.h
 Osmocom Complex vectors header.
 
file  cxvec.c
 Osmocom Complex vectors implementation.
 

Data Structures

struct  osmo_cxvec
 Complex vector. More...
 

Functions

void osmo_cxvec_init_from_data (struct osmo_cxvec *cv, float complex *data, int len)
 Initialize a vector structure with a given data array. More...
 
struct osmo_cxvecosmo_cxvec_alloc_from_data (float complex *data, int len)
 Allocate a complex vector referencing a given data array. More...
 
struct osmo_cxvecosmo_cxvec_alloc (int max_len)
 Allocate a complex vector of a given maximum length. More...
 
void osmo_cxvec_free (struct osmo_cxvec *cv)
 Free a complex vector (and possibly associated data) More...
 
void osmo_cxvec_dbg_dump (struct osmo_cxvec *cv, const char *fname)
 Save the data contained of a vector into a .cfile for debug. More...
 

Detailed Description

Function Documentation

◆ osmo_cxvec_alloc()

struct osmo_cxvec * osmo_cxvec_alloc ( int  max_len)

Allocate a complex vector of a given maximum length.

Parameters
[in]max_lenMaximum length of data

Data array is allocated along with the structure, but is uninitialized. Length is set to 0.

References osmo_cxvec::_data, osmo_cxvec::data, osmo_cxvec::flags, osmo_cxvec::len, and osmo_cxvec::max_len.

Referenced by osmo_cxvec_convolve(), osmo_cxvec_correlate(), osmo_cxvec_delay(), osmo_cxvec_rotate(), osmo_cxvec_scale(), osmo_cxvec_sig_normalize(), osmo_iqbal_cxvec_fix(), and osmo_iqbal_cxvec_optimize().

◆ osmo_cxvec_alloc_from_data()

struct osmo_cxvec * osmo_cxvec_alloc_from_data ( float complex *  data,
int  len 
)

Allocate a complex vector referencing a given data array.

Parameters
[in]dataPointer to the complex data array
[in]lenNumber of complex samples

The data is not copied, it is just referenced.

References osmo_cxvec::data, osmo_cxvec::len, and osmo_cxvec_init_from_data().

◆ osmo_cxvec_dbg_dump()

void osmo_cxvec_dbg_dump ( struct osmo_cxvec cv,
const char *  fname 
)

Save the data contained of a vector into a .cfile for debug.

Parameters
[in]cvComplex vector to save
[in]fnameFilename to save the data to

References osmo_cxvec::data, and osmo_cxvec::len.

◆ osmo_cxvec_free()

void osmo_cxvec_free ( struct osmo_cxvec cv)

Free a complex vector (and possibly associated data)

Parameters
[in]cvComplex vector to free

Notes: - Can be safely called with NULL

Referenced by osmo_cxvec_delay(), and osmo_iqbal_cxvec_optimize().

◆ osmo_cxvec_init_from_data()

void osmo_cxvec_init_from_data ( struct osmo_cxvec cv,
float complex *  data,
int  len 
)

Initialize a vector structure with a given data array.

Parameters
[out]cvThe vector to be initialized
[in]dataPointer to the complex data array
[in]lenNumber of complex samples

The data is not copied, it is just referenced.

References osmo_cxvec::data, osmo_cxvec::flags, osmo_cxvec::len, and osmo_cxvec::max_len.

Referenced by osmo_cxvec_alloc_from_data(), and osmo_cxvec_delay().