libosmodsp UNKNOWN Osmocom DSP library

- Main Page
- Modules
- Data Structures
- Files

Modules | Files | Data Structures | Functions
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_cxvec * | osmo_cxvec_alloc_from_data (float complex *data, int len)
| Allocate a complex vector referencing a given data array. More...
struct osmo_cxvec * | osmo_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

struct osmo_cxvec * osmo_cxvec_alloc | ( | int | max_len | ) |

Allocate a complex vector of a given maximum length.

Parameters

  [in] | max_len | Maximum 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().

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

Allocate a complex vector referencing a given data array.

Parameters

  [in] | data | Pointer to the complex data array
  [in] | len | Number of complex samples

The data is not copied, it is just referenced.

References osmo_cxvec_init_from_data().

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] | cv | Complex vector to save
  [in] | fname | Filename to save the data to

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

void osmo_cxvec_free | ( | struct osmo_cxvec * | cv | ) |

Free a complex vector (and possibly associated data)

Parameters

  [in] | cv | Complex vector to free

Notes: - Can be safely called with NULL

- If the data was allocated with the vector using osmo_cxvec_alloc , it will be free as well. If the data was pre-existing ( osmo_cxvec_init_from_data or osmo_cxvec_alloc_from_data ) it will not be free'd.

Referenced by osmo_cxvec_delay(), and osmo_iqbal_cxvec_optimize().

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] | cv | The vector to be initialized
  [in] | data | Pointer to the complex data array
  [in] | len | Number 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().