ncigt-fil
Functions
Matrix-Vector Utility Functions

Functions

COMPLEX inner_product (COMPLEX *a, COMPLEX *b, int n)
 
void matrix_transpose (COMPLEX *A, int m, int n)
 
void matrix_vector_product (COMPLEX *A, COMPLEX *b, int m, int n, COMPLEX *res)
 
void matrix_vector_product_threaded (COMPLEX *A, COMPLEX *b, int m, int n, COMPLEX *res, int numthread)
 

Detailed Description

A collection of matrix-vector utilities for use with complex-valued data structures

Function Documentation

COMPLEX inner_product ( COMPLEX *  a,
COMPLEX *  b,
int  n 
)

Calculate the inner product, $ \sum_{i=1}^n a_i^* b_i $, of two complex vectors

Parameters
apointer to first vector
bpointer to second vector
nlength of the vectors
void matrix_transpose ( COMPLEX *  A,
int  m,
int  n 
)

Perform $A = A^T$ where (m,n) is the size of the input matrix

Parameters
Apointer to input data array
mnumber of rows in the data
nnumber of columns in the data
void matrix_vector_product ( COMPLEX *  A,
COMPLEX *  b,
int  m,
int  n,
COMPLEX *  res 
)

Compute a matrix vector product, $ x = A b $, where $ x_i = \sum_j A_{i,j} b_j $.

Parameters
Aa pointer to the complex matrix (m rows, n columns)
ba pointer to the complex vector (n entrys)
mnumber of rows in A
nnumber of columns in A
resa pointer to the result, a complex vector, $x = A b$, (m entrys)
void matrix_vector_product_threaded ( COMPLEX *  A,
COMPLEX *  b,
int  m,
int  n,
COMPLEX *  res,
int  numthread 
)

A threaded version of matrix_vector_product

Parameters
Aa pointer to the complex matrix (m rows, n columns)
ba pointer to the complex vector (n entrys)
mnumber of rows in A
nnumber of columns in A
resa pointer to the result, a complex vector, $x = A' b$, (m entrys)
numthreaddefault=16