JWS C Library
C language utility library
matblock.h File Reference

Declarations for a matrix block and associated functions. More...

#include <jwsc/config.h>
#include <stdlib.h>
#include <inttypes.h>
#include "jwsc/base/error.h"
#include "jwsc/math/complex.h"
#include "jwsc/matrix/matrix.h"
Include dependency graph for matblock.h:

Go to the source code of this file.

Data Structures

struct  Matblock_i8
 Matrix block of signed 8-bit values. More...
struct  Matblock_i16
 Matrix block of signed 16-bit values. More...
struct  Matblock_i32
 Matrix block of signed 32-bit values. More...
struct  Matblock_i64
 Matrix block of signed 64-bit values. More...
struct  Matblock_u8
 Matrix block of unsigned 8-bit values. More...
struct  Matblock_u16
 Matrix block of unsigned 16-bit values. More...
struct  Matblock_u32
 Matrix block of unsigned 32-bit values. More...
struct  Matblock_u64
 Matrix block of unsigned 64-bit values. More...
struct  Matblock_f
 Matrix block of single precision floating point values. More...
struct  Matblock_d
 Matrix block of double precision floating point values. More...
struct  Matblock_cf
 Matrix block of single precision complex floating point values. More...
struct  Matblock_cd
 Matrix block of double precision complex floating point values. More...

Enumerations

enum  Matblock_matrix
 Orientation of a matrix in a matblock. More...

Functions

create_matblock

Creates a matrix block of integer or floating point values.

void create_matblock_u8 (Matblock_u8 **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 8-bit unsigned integer.
void create_matblock_u32 (Matblock_u32 **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 32-bit unsigned integer.
void create_matblock_i32 (Matblock_i32 **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 32-bit signed integer.
void create_matblock_i64 (Matblock_i64 **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 64-bit signed integer.
void create_matblock_f (Matblock_f **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Single precision floating point.
void create_matblock_d (Matblock_d **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Double precision floating point.
void create_matblock_cf (Matblock_cf **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Single precision complex floating point.
void create_matblock_cd (Matblock_cd **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Double precision complexfloating point.
create_init_matblock

Creates and initializes a matrix block of integer or floating point values.

void create_init_matblock_u8 (Matblock_u8 **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols, uint8_t val)
 8-bit unsigned integer.
void create_init_matblock_u32 (Matblock_u32 **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols, uint32_t val)
 32-bit unsigned integer.
void create_init_matblock_i32 (Matblock_i32 **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols, int32_t val)
 32-bit signed integer.
void create_init_matblock_i64 (Matblock_i64 **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols, int64_t val)
 64-bit signed integer.
void create_init_matblock_f (Matblock_f **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols, float val)
 Single precision floating point.
void create_init_matblock_d (Matblock_d **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols, double val)
 Double precision floating point.
void create_init_matblock_cf (Matblock_cf **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols, Complex_f val)
 Single precision complex floating point.
void create_init_matblock_cd (Matblock_cd **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols, Complex_d val)
 Double precision complexfloating point.
create_zero_matblock

Creates a matrix block of integer or floating point values and initializes it with zeros.

void create_zero_matblock_u8 (Matblock_u8 **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 8-bit unsigned integer.
void create_zero_matblock_u32 (Matblock_u32 **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 32-bit unsigned integer.
void create_zero_matblock_i32 (Matblock_i32 **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 32-bit signed integer.
void create_zero_matblock_i64 (Matblock_i64 **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 64-bit signed integer.
void create_zero_matblock_f (Matblock_f **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Single precision floating point.
void create_zero_matblock_d (Matblock_d **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Double precision floating point.
void create_zero_matblock_cf (Matblock_cf **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Single precision complex floating point.
void create_zero_matblock_cd (Matblock_cd **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Double precision complexfloating point.
create_random_matblock

Creates a matrix block of integer or floating point values and initializes it with random values.

void create_random_matblock_u32 (Matblock_u32 **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols, uint32_t min, uint32_t max)
 32-bit unsigned integer.
void create_random_matblock_i32 (Matblock_i32 **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols, int32_t min, int32_t max)
 32-bit signed integer.
void create_random_matblock_i64 (Matblock_i64 **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols, int64_t min, int64_t max)
 64-bit signed integer.
void create_random_matblock_f (Matblock_f **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols, float min, float max)
 Single precision floating point.
void create_random_matblock_d (Matblock_d **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols, double min, double max)
 Double precision floating point.
void create_random_matblock_cf (Matblock_cf **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols, Complex_f min, Complex_f max)
 Single precision complex floating point.
void create_random_matblock_cd (Matblock_cd **m_out, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols, Complex_d min, Complex_d max)
 Double precision complexfloating point.
copy_matblock

Copies a matrix block into another.

Errorcopy_matblock_u32 (Matblock_u32 **m_out, const Matblock_u32 *m_in)
 32-bit unsigned integer.
Errorcopy_matblock_i32 (Matblock_i32 **m_out, const Matblock_i32 *m_in)
 32-bit signed integer.
Errorcopy_matblock_i64 (Matblock_i64 **m_out, const Matblock_i64 *m_in)
 64-bit signed integer.
Errorcopy_matblock_f (Matblock_f **m_out, const Matblock_f *m_in)
 Single precision floating point.
Errorcopy_matblock_d (Matblock_d **m_out, const Matblock_d *m_in)
 Double precision floating point.
Errorcopy_matblock_cf (Matblock_cf **m_out, const Matblock_cf *m_in)
 Single precision complex floating point.
Errorcopy_matblock_cd (Matblock_cd **m_out, const Matblock_cd *m_in)
 Double precision complex floating point.
copy_matblock_block

Copies a block of a matrix block.

Errorcopy_matblock_block_u32 (Matblock_u32 **m_out, const Matblock_u32 *m_in, uint32_t mat_offset, uint32_t row_offset, uint32_t col_offset, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a 32-bit unsigned integer matrix block.
Errorcopy_matblock_block_i32 (Matblock_i32 **m_out, const Matblock_i32 *m_in, uint32_t mat_offset, uint32_t row_offset, uint32_t col_offset, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a 32-bit signed integer matrix block.
Errorcopy_matblock_block_i64 (Matblock_i64 **m_out, const Matblock_i64 *m_in, uint32_t mat_offset, uint32_t row_offset, uint32_t col_offset, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a 64-bit signed integer matrix block.
Errorcopy_matblock_block_f (Matblock_f **m_out, const Matblock_f *m_in, uint32_t mat_offset, uint32_t row_offset, uint32_t col_offset, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a single precision floating point matrix block.
Errorcopy_matblock_block_d (Matblock_d **m_out, const Matblock_d *m_in, uint32_t mat_offset, uint32_t row_offset, uint32_t col_offset, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a double precision floating point matrix block.
Errorcopy_matblock_block_cf (Matblock_cf **m_out, const Matblock_cf *m_in, uint32_t mat_offset, uint32_t row_offset, uint32_t col_offset, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a single precision complex floating point matrix block.
Errorcopy_matblock_block_cd (Matblock_cd **m_out, const Matblock_cd *m_in, uint32_t mat_offset, uint32_t row_offset, uint32_t col_offset, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a double precision complex floating point matrix block.
copy_matblock_into_matblock

Copies a block of a matrix block into another.

Errorcopy_matblock_block_into_matblock_u32 (Matblock_u32 *m_1, uint32_t mat_offset_1, uint32_t row_offset_1, uint32_t col_offset_1, const Matblock_u32 *m_2, uint32_t mat_offset_2, uint32_t row_offset_2, uint32_t col_offset_2, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a 32-bit unsigned integer matrix block into another.
Errorcopy_matblock_block_into_matblock_i32 (Matblock_i32 *m_1, uint32_t mat_offset_1, uint32_t row_offset_1, uint32_t col_offset_1, const Matblock_i32 *m_2, uint32_t mat_offset_2, uint32_t row_offset_2, uint32_t col_offset_2, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a 32-bit signed integer matrix block into another.
Errorcopy_matblock_block_into_matblock_i64 (Matblock_i64 *m_1, uint32_t mat_offset_1, uint32_t row_offset_1, uint32_t col_offset_1, const Matblock_i64 *m_2, uint32_t mat_offset_2, uint32_t row_offset_2, uint32_t col_offset_2, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a 64-bit signed integer matrix block into another.
Errorcopy_matblock_block_into_matblock_f (Matblock_f *m_1, uint32_t mat_offset_1, uint32_t row_offset_1, uint32_t col_offset_1, const Matblock_f *m_2, uint32_t mat_offset_2, uint32_t row_offset_2, uint32_t col_offset_2, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a single precision floating point matrix block into another.
Errorcopy_matblock_block_into_matblock_d (Matblock_d *m_1, uint32_t mat_offset_1, uint32_t row_offset_1, uint32_t col_offset_1, const Matblock_d *m_2, uint32_t mat_offset_2, uint32_t row_offset_2, uint32_t col_offset_2, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a double precision floating point matrix block into another.
Errorcopy_matblock_block_into_matblock_cf (Matblock_cf *m_1, uint32_t mat_offset_1, uint32_t row_offset_1, uint32_t col_offset_1, const Matblock_cf *m_2, uint32_t mat_offset_2, uint32_t row_offset_2, uint32_t col_offset_2, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a single precision complex floating point matrix block into another.
Errorcopy_matblock_block_into_matblock_cd (Matblock_cd *m_1, uint32_t mat_offset_1, uint32_t row_offset_1, uint32_t col_offset_1, const Matblock_cd *m_2, uint32_t mat_offset_2, uint32_t row_offset_2, uint32_t col_offset_2, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a double precision complex floating point matrix block into another.
copy_matrix_into_matblock

Copies a matrix into a matblock.

Errorcopy_matrix_into_matblock_u32 (Matblock_u32 **mb_out, const Matblock_u32 *mb_in, const Matrix_u32 *m, Matblock_matrix orient, uint32_t index)
 Copies a 32-bit unsigned integer matrix into a matrix block.
Errorcopy_matrix_into_matblock_i32 (Matblock_i32 **mb_out, const Matblock_i32 *mb_in, const Matrix_i32 *m, Matblock_matrix orient, uint32_t index)
 Copies a 32-bit signed integer matrix into a matrix block.
Errorcopy_matrix_into_matblock_i64 (Matblock_i64 **mb_out, const Matblock_i64 *mb_in, const Matrix_i64 *m, Matblock_matrix orient, uint32_t index)
 Copies a 32-bit signed integer matrix into a matrix block.
Errorcopy_matrix_into_matblock_f (Matblock_f **mb_out, const Matblock_f *mb_in, const Matrix_f *m, Matblock_matrix orient, uint32_t index)
 Copies a 32-bit signed integer matrix into a matrix block.
Errorcopy_matrix_into_matblock_d (Matblock_d **mb_out, const Matblock_d *mb_in, const Matrix_d *m, Matblock_matrix orient, uint32_t index)
 Copies a 32-bit signed integer matrix into a matrix block.
Errorcopy_matrix_into_matblock_cf (Matblock_cf **mb_out, const Matblock_cf *mb_in, const Matrix_cf *m, Matblock_matrix orient, uint32_t index)
 Copies a 32-bit signed integer matrix into a matrix block.
Errorcopy_matrix_into_matblock_cd (Matblock_cd **mb_out, const Matblock_cd *mb_in, const Matrix_cd *m, Matblock_matrix orient, uint32_t index)
 Copies a 32-bit signed integer matrix into a matrix block.
copy_matrix_from_matblock

Copies a matrix from a matblock.

Errorcopy_matrix_from_matblock_u32 (Matrix_u32 **m_out, const Matblock_u32 *mb, Matblock_matrix orient, uint32_t index)
 Copies a 32-bit unsigned integer matrix from a matrix block.
Errorcopy_matrix_from_matblock_i32 (Matrix_i32 **m_out, const Matblock_i32 *mb, Matblock_matrix orient, uint32_t index)
 Copies a 32-bit signed integer matrix from a matrix block.
Errorcopy_matrix_from_matblock_i64 (Matrix_i64 **m_out, const Matblock_i64 *mb, Matblock_matrix orient, uint32_t index)
 Copies a 32-bit signed integer matrix from a matrix block.
Errorcopy_matrix_from_matblock_f (Matrix_f **m_out, const Matblock_f *mb, Matblock_matrix orient, uint32_t index)
 Copies a 32-bit signed integer matrix from a matrix block.
Errorcopy_matrix_from_matblock_d (Matrix_d **m_out, const Matblock_d *mb, Matblock_matrix orient, uint32_t index)
 Copies a 32-bit signed integer matrix from a matrix block.
Errorcopy_matrix_from_matblock_cf (Matrix_cf **m_out, const Matblock_cf *mb, Matblock_matrix orient, uint32_t index)
 Copies a 32-bit signed integer matrix from a matrix block.
Errorcopy_matrix_from_matblock_cd (Matrix_cd **m_out, const Matblock_cd *mb, Matblock_matrix orient, uint32_t index)
 Copies a 32-bit signed integer matrix from a matrix block.
free_matblock

Frees a matrix block.

void free_matblock_u8 (Matblock_u8 *m)
 Frees a 8-bit unsigned integer matrix block.
void free_matblock_u32 (Matblock_u32 *m)
 Frees a 32-bit unsigned integer matrix block.
void free_matblock_i32 (Matblock_i32 *m)
 Frees a 32-bit signed integer matrix block.
void free_matblock_i64 (Matblock_i64 *m)
 Frees a 64-bit signed integer matrix block.
void free_matblock_f (Matblock_f *m)
 Frees a single precision floating point matrix block.
void free_matblock_d (Matblock_d *m)
 Frees a double precision floating point matrix block.
void free_matblock_cf (Matblock_cf *m)
 Frees a single precision complex floating point matrix block.
void free_matblock_cd (Matblock_cd *m)
 Frees a double precision complex floating point matrix block.

Detailed Description

Declarations for a matrix block and associated functions.

Author:
Joseph Schlecht
License:
Creative Commons BY-NC-SA 3.0

The matrix block holds integers and floating point real and complex numbers.

Although the matrix block is indexed by matrix, row, and column, the elements are allocated as a 1D array in matrix,row,col order (that would be matrix-major order). So iterating over the elements can be done inside a single loop.

Definition in file matblock.h.


Enumeration Type Documentation

Orientation of a matrix in a matblock.

Definition at line 280 of file matblock.h.


Function Documentation

void create_matblock_u8 ( Matblock_u8 **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

8-bit unsigned integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix block.
Note:
Dimensions must be > 0.

Definition at line 91 of file matblock.c.

void create_matblock_u32 ( Matblock_u32 **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

32-bit unsigned integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix block.
Note:
Dimensions must be > 0.

Definition at line 156 of file matblock.c.

void create_matblock_i32 ( Matblock_i32 **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

32-bit signed integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix block.
Note:
Dimensions must be > 0.

Definition at line 221 of file matblock.c.

void create_matblock_i64 ( Matblock_i64 **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

64-bit signed integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix block.
Note:
Dimensions must be > 0.

Definition at line 286 of file matblock.c.

void create_matblock_f ( Matblock_f **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Single precision floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix block.
Note:
Dimensions must be > 0.

Definition at line 351 of file matblock.c.

void create_matblock_d ( Matblock_d **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Double precision floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix block.
Note:
Dimensions must be > 0.

Definition at line 416 of file matblock.c.

void create_matblock_cf ( Matblock_cf **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Single precision complex floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix block.
Note:
Dimensions must be > 0.

Definition at line 481 of file matblock.c.

void create_matblock_cd ( Matblock_cd **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Double precision complexfloating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix block.
Note:
Dimensions must be > 0.

Definition at line 546 of file matblock.c.

void create_init_matblock_u8 ( Matblock_u8 **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols,
uint8_t  val 
)

8-bit unsigned integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix. block
valValue to initialize all elements of the matrix block with.
Note:
Dimensions must be > 0.

Definition at line 624 of file matblock.c.

void create_init_matblock_u32 ( Matblock_u32 **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols,
uint32_t  val 
)

32-bit unsigned integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix. block
valValue to initialize all elements of the matrix block with.
Note:
Dimensions must be > 0.

Definition at line 657 of file matblock.c.

void create_init_matblock_i32 ( Matblock_i32 **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols,
int32_t  val 
)

32-bit signed integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix. block
valValue to initialize all elements of the matrix block with.
Note:
Dimensions must be > 0.

Definition at line 690 of file matblock.c.

void create_init_matblock_i64 ( Matblock_i64 **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols,
int64_t  val 
)

64-bit signed integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix. block
valValue to initialize all elements of the matrix block with.
Note:
Dimensions must be > 0.

Definition at line 723 of file matblock.c.

void create_init_matblock_f ( Matblock_f **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols,
float  val 
)

Single precision floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix. block
valValue to initialize all elements of the matrix block with.
Note:
Dimensions must be > 0.

Definition at line 756 of file matblock.c.

void create_init_matblock_d ( Matblock_d **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols,
double  val 
)

Double precision floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix. block
valValue to initialize all elements of the matrix block with.
Note:
Dimensions must be > 0.

Definition at line 789 of file matblock.c.

void create_init_matblock_cf ( Matblock_cf **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols,
Complex_f  val 
)

Single precision complex floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix. block
valValue to initialize all elements of the matrix block with.
Note:
Dimensions must be > 0.

Definition at line 822 of file matblock.c.

void create_init_matblock_cd ( Matblock_cd **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols,
Complex_d  val 
)

Double precision complexfloating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix. block
valValue to initialize all elements of the matrix block with.
Note:
Dimensions must be > 0.

Definition at line 855 of file matblock.c.

void create_zero_matblock_u8 ( Matblock_u8 **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

8-bit unsigned integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix block.
Note:
Dimensions must be > 0.

Definition at line 900 of file matblock.c.

void create_zero_matblock_u32 ( Matblock_u32 **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

32-bit unsigned integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix block.
Note:
Dimensions must be > 0.

Definition at line 920 of file matblock.c.

void create_zero_matblock_i32 ( Matblock_i32 **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

32-bit signed integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix block.
Note:
Dimensions must be > 0.

Definition at line 940 of file matblock.c.

void create_zero_matblock_i64 ( Matblock_i64 **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

64-bit signed integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix block.
Note:
Dimensions must be > 0.

Definition at line 960 of file matblock.c.

void create_zero_matblock_f ( Matblock_f **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Single precision floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix block.
Note:
Dimensions must be > 0.

Definition at line 980 of file matblock.c.

void create_zero_matblock_d ( Matblock_d **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Double precision floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix block.
Note:
Dimensions must be > 0.

Definition at line 1000 of file matblock.c.

void create_zero_matblock_cf ( Matblock_cf **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Single precision complex floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix block.
Note:
Dimensions must be > 0.

Definition at line 1020 of file matblock.c.

void create_zero_matblock_cd ( Matblock_cd **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Double precision complexfloating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix block.
Note:
Dimensions must be > 0.

Definition at line 1041 of file matblock.c.

void create_random_matblock_u32 ( Matblock_u32 **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols,
uint32_t  min,
uint32_t  max 
)

32-bit unsigned integer.

Calls rand() to generate the random numbers.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix block.
minMinimum random value.
maxMaximum random value.
Note:
Dimensions must be > 0.
Warning:
Does not check min and max to see if they would cause overflow.

Definition at line 1082 of file matblock.c.

void create_random_matblock_i32 ( Matblock_i32 **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols,
int32_t  min,
int32_t  max 
)

32-bit signed integer.

Calls rand() to generate the random numbers.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix block.
minMinimum random value.
maxMaximum random value.
Note:
Dimensions must be > 0.
Warning:
Does not check min and max to see if they would cause overflow.

Definition at line 1124 of file matblock.c.

void create_random_matblock_i64 ( Matblock_i64 **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols,
int64_t  min,
int64_t  max 
)

64-bit signed integer.

Calls rand() to generate the random numbers.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix block.
minMinimum random value.
maxMaximum random value.
Note:
Dimensions must be > 0.
Warning:
Does not check min and max to see if they would cause overflow.

Definition at line 1166 of file matblock.c.

void create_random_matblock_f ( Matblock_f **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols,
float  min,
float  max 
)

Single precision floating point.

Calls rand() to generate the random numbers.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix block.
minMinimum random value.
maxMaximum random value.
Note:
Dimensions must be > 0.
Warning:
Does not check min and max to see if they would cause overflow.

Definition at line 1208 of file matblock.c.

void create_random_matblock_d ( Matblock_d **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols,
double  min,
double  max 
)

Double precision floating point.

Calls rand() to generate the random numbers.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix block.
minMinimum random value.
maxMaximum random value.
Note:
Dimensions must be > 0.
Warning:
Does not check min and max to see if they would cause overflow.

Definition at line 1250 of file matblock.c.

void create_random_matblock_cf ( Matblock_cf **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols,
Complex_f  min,
Complex_f  max 
)

Single precision complex floating point.

Calls rand() to generate the random numbers.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix block.
minMinimum random value.
maxMaximum random value.
Note:
Dimensions must be > 0.
Warning:
Does not check min and max to see if they would cause overflow.

Definition at line 1292 of file matblock.c.

void create_random_matblock_cd ( Matblock_cd **  m_out,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols,
Complex_d  min,
Complex_d  max 
)

Double precision complexfloating point.

Calls rand() to generate the random numbers.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
num_matsNumber of matrices in the matrix block.
num_rowsNumber of rows in the matrix block.
num_colsNumber of columns in the matrix block.
minMinimum random value.
maxMaximum random value.
Note:
Dimensions must be > 0.
Warning:
Does not check min and max to see if they would cause overflow.

Definition at line 1336 of file matblock.c.

Error* copy_matblock_u32 ( Matblock_u32 **  m_out,
const Matblock_u32 m_in 
)

32-bit unsigned integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inMatrix block to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix block into itself, i.e., *m_out == m_in.

Definition at line 1387 of file matblock.c.

Error* copy_matblock_i32 ( Matblock_i32 **  m_out,
const Matblock_i32 m_in 
)

32-bit signed integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inMatrix block to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix block into itself, i.e., *m_out == m_in.

Definition at line 1425 of file matblock.c.

Error* copy_matblock_i64 ( Matblock_i64 **  m_out,
const Matblock_i64 m_in 
)

64-bit signed integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inMatrix block to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix block into itself, i.e., *m_out == m_in.

Definition at line 1463 of file matblock.c.

Error* copy_matblock_f ( Matblock_f **  m_out,
const Matblock_f m_in 
)

Single precision floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inMatrix block to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix block into itself, i.e., *m_out == m_in.

Definition at line 1501 of file matblock.c.

Error* copy_matblock_d ( Matblock_d **  m_out,
const Matblock_d m_in 
)

Double precision floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inMatrix block to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix block into itself, i.e., *m_out == m_in.

Definition at line 1546 of file matblock.c.

Error* copy_matblock_cf ( Matblock_cf **  m_out,
const Matblock_cf m_in 
)

Single precision complex floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inMatrix block to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix block into itself, i.e., *m_out == m_in.

Definition at line 1591 of file matblock.c.

Error* copy_matblock_cd ( Matblock_cd **  m_out,
const Matblock_cd m_in 
)

Double precision complex floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inMatrix block to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix block into itself, i.e., *m_out == m_in.

Definition at line 1636 of file matblock.c.

Error* copy_matblock_block_u32 ( Matblock_u32 **  m_out,
const Matblock_u32 m_in,
uint32_t  mat_offset,
uint32_t  row_offset,
uint32_t  col_offset,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a 32-bit unsigned integer matrix block.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inMatrix block to copy a block from.
mat_offsetPosition of first matrix to begin copying from.
row_offsetPosition of first row to begin copying from.
col_offsetPosition of first column to begin copying from.
num_matsNumber of matrices to copy.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned and *m_out is freed and set to NULL (if it is not m_in).
Note:
Dimensions must be > 0.
Does not support copying a matrix block into itself, i.e., *m_out == m_in.

Definition at line 1705 of file matblock.c.

Error* copy_matblock_block_i32 ( Matblock_i32 **  m_out,
const Matblock_i32 m_in,
uint32_t  mat_offset,
uint32_t  row_offset,
uint32_t  col_offset,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a 32-bit signed integer matrix block.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inMatrix block to copy a block from.
mat_offsetPosition of first matrix to begin copying from.
row_offsetPosition of first row to begin copying from.
col_offsetPosition of first column to begin copying from.
num_matsNumber of matrices to copy.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned and *m_out is freed and set to NULL (if it is not m_in).
Note:
Dimensions must be > 0.
Does not support copying a matrix block into itself, i.e., *m_out == m_in.

Definition at line 1775 of file matblock.c.

Error* copy_matblock_block_i64 ( Matblock_i64 **  m_out,
const Matblock_i64 m_in,
uint32_t  mat_offset,
uint32_t  row_offset,
uint32_t  col_offset,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a 64-bit signed integer matrix block.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inMatrix block to copy a block from.
mat_offsetPosition of first matrix to begin copying from.
row_offsetPosition of first row to begin copying from.
col_offsetPosition of first column to begin copying from.
num_matsNumber of matrices to copy.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned and *m_out is freed and set to NULL (if it is not m_in).
Note:
Dimensions must be > 0.
Does not support copying a matrix block into itself, i.e., *m_out == m_in.

Definition at line 1845 of file matblock.c.

Error* copy_matblock_block_f ( Matblock_f **  m_out,
const Matblock_f m_in,
uint32_t  mat_offset,
uint32_t  row_offset,
uint32_t  col_offset,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a single precision floating point matrix block.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inMatrix block to copy a block from.
mat_offsetPosition of first matrix to begin copying from.
row_offsetPosition of first row to begin copying from.
col_offsetPosition of first column to begin copying from.
num_matsNumber of matrices to copy.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned and *m_out is freed and set to NULL (if it is not m_in).
Note:
Dimensions must be > 0.
Does not support copying a matrix block into itself, i.e., *m_out == m_in.

Definition at line 1915 of file matblock.c.

Error* copy_matblock_block_d ( Matblock_d **  m_out,
const Matblock_d m_in,
uint32_t  mat_offset,
uint32_t  row_offset,
uint32_t  col_offset,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a double precision floating point matrix block.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inMatrix block to copy a block from.
mat_offsetPosition of first matrix to begin copying from.
row_offsetPosition of first row to begin copying from.
col_offsetPosition of first column to begin copying from.
num_matsNumber of matrices to copy.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned and *m_out is freed and set to NULL (if it is not m_in).
Note:
Dimensions must be > 0.
Does not support copying a matrix block into itself, i.e., *m_out == m_in.

Definition at line 1985 of file matblock.c.

Error* copy_matblock_block_cf ( Matblock_cf **  m_out,
const Matblock_cf m_in,
uint32_t  mat_offset,
uint32_t  row_offset,
uint32_t  col_offset,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a single precision complex floating point matrix block.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inMatrix block to copy a block from.
mat_offsetPosition of first matrix to begin copying from.
row_offsetPosition of first row to begin copying from.
col_offsetPosition of first column to begin copying from.
num_matsNumber of matrices to copy.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned and *m_out is freed and set to NULL (if it is not m_in).
Note:
Dimensions must be > 0.
Does not support copying a matrix block into itself, i.e., *m_out == m_in.

Definition at line 2055 of file matblock.c.

Error* copy_matblock_block_cd ( Matblock_cd **  m_out,
const Matblock_cd m_in,
uint32_t  mat_offset,
uint32_t  row_offset,
uint32_t  col_offset,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a double precision complex floating point matrix block.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inMatrix block to copy a block from.
mat_offsetPosition of first matrix to begin copying from.
row_offsetPosition of first row to begin copying from.
col_offsetPosition of first column to begin copying from.
num_matsNumber of matrices to copy.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned and *m_out is freed and set to NULL (if it is not m_in).
Note:
Dimensions must be > 0.
Does not support copying a matrix block into itself, i.e., *m_out == m_in.

Definition at line 2125 of file matblock.c.

Error* copy_matblock_block_into_matblock_u32 ( Matblock_u32 m_1,
uint32_t  mat_offset_1,
uint32_t  row_offset_1,
uint32_t  col_offset_1,
const Matblock_u32 m_2,
uint32_t  mat_offset_2,
uint32_t  row_offset_2,
uint32_t  col_offset_2,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a 32-bit unsigned integer matrix block into another.

Parameters:
m_1Matrix block to copy the block into.
mat_offset_1Position of first matrix to copy into m_1.
row_offset_1Position of first row to copy into m_1.
col_offset_1Position of first column to copy into m_1.
m_2Matrix block to copy the block from.
mat_offset_2Position of first matrix to copy from m_2.
row_offset_2Position of first row to copy from m_2.
col_offset_2Position of first column to copy from m_2.
num_matsNumber of matrices to copy.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix block into itself, i.e., m_1 == m_2.
Dimensions must be > 0.

Definition at line 2208 of file matblock.c.

Error* copy_matblock_block_into_matblock_i32 ( Matblock_i32 m_1,
uint32_t  mat_offset_1,
uint32_t  row_offset_1,
uint32_t  col_offset_1,
const Matblock_i32 m_2,
uint32_t  mat_offset_2,
uint32_t  row_offset_2,
uint32_t  col_offset_2,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a 32-bit signed integer matrix block into another.

Parameters:
m_1Matrix block to copy the block into.
mat_offset_1Position of first matrix to copy into m_1.
row_offset_1Position of first row to copy into m_1.
col_offset_1Position of first column to copy into m_1.
m_2Matrix block to copy the block from.
mat_offset_2Position of first matrix to copy from m_2.
row_offset_2Position of first row to copy from m_2.
col_offset_2Position of first column to copy from m_2.
num_matsNumber of matrices to copy.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix block into itself, i.e., m_1 == m_2.
Dimensions must be > 0.

Definition at line 2284 of file matblock.c.

Error* copy_matblock_block_into_matblock_i64 ( Matblock_i64 m_1,
uint32_t  mat_offset_1,
uint32_t  row_offset_1,
uint32_t  col_offset_1,
const Matblock_i64 m_2,
uint32_t  mat_offset_2,
uint32_t  row_offset_2,
uint32_t  col_offset_2,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a 64-bit signed integer matrix block into another.

Parameters:
m_1Matrix block to copy the block into.
mat_offset_1Position of first matrix to copy into m_1.
row_offset_1Position of first row to copy into m_1.
col_offset_1Position of first column to copy into m_1.
m_2Matrix block to copy the block from.
mat_offset_2Position of first matrix to copy from m_2.
row_offset_2Position of first row to copy from m_2.
col_offset_2Position of first column to copy from m_2.
num_matsNumber of matrices to copy.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix block into itself, i.e., m_1 == m_2.
Dimensions must be > 0.

Definition at line 2360 of file matblock.c.

Error* copy_matblock_block_into_matblock_f ( Matblock_f m_1,
uint32_t  mat_offset_1,
uint32_t  row_offset_1,
uint32_t  col_offset_1,
const Matblock_f m_2,
uint32_t  mat_offset_2,
uint32_t  row_offset_2,
uint32_t  col_offset_2,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a single precision floating point matrix block into another.

Parameters:
m_1Matrix block to copy the block into.
mat_offset_1Position of first matrix to copy into m_1.
row_offset_1Position of first row to copy into m_1.
col_offset_1Position of first column to copy into m_1.
m_2Matrix block to copy the block from.
mat_offset_2Position of first matrix to copy from m_2.
row_offset_2Position of first row to copy from m_2.
col_offset_2Position of first column to copy from m_2.
num_matsNumber of matrices to copy.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix block into itself, i.e., m_1 == m_2.
Dimensions must be > 0.

Definition at line 2436 of file matblock.c.

Error* copy_matblock_block_into_matblock_d ( Matblock_d m_1,
uint32_t  mat_offset_1,
uint32_t  row_offset_1,
uint32_t  col_offset_1,
const Matblock_d m_2,
uint32_t  mat_offset_2,
uint32_t  row_offset_2,
uint32_t  col_offset_2,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a double precision floating point matrix block into another.

Parameters:
m_1Matrix block to copy the block into.
mat_offset_1Position of first matrix to copy into m_1.
row_offset_1Position of first row to copy into m_1.
col_offset_1Position of first column to copy into m_1.
m_2Matrix block to copy the block from.
mat_offset_2Position of first matrix to copy from m_2.
row_offset_2Position of first row to copy from m_2.
col_offset_2Position of first column to copy from m_2.
num_matsNumber of matrices to copy.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix block into itself, i.e., m_1 == m_2.
Dimensions must be > 0.

Definition at line 2512 of file matblock.c.

Error* copy_matblock_block_into_matblock_cf ( Matblock_cf m_1,
uint32_t  mat_offset_1,
uint32_t  row_offset_1,
uint32_t  col_offset_1,
const Matblock_cf m_2,
uint32_t  mat_offset_2,
uint32_t  row_offset_2,
uint32_t  col_offset_2,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a single precision complex floating point matrix block into another.

Parameters:
m_1Matrix block to copy the block into.
mat_offset_1Position of first matrix to copy into m_1.
row_offset_1Position of first row to copy into m_1.
col_offset_1Position of first column to copy into m_1.
m_2Matrix block to copy the block from.
mat_offset_2Position of first matrix to copy from m_2.
row_offset_2Position of first row to copy from m_2.
col_offset_2Position of first column to copy from m_2.
num_matsNumber of matrices to copy.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix block into itself, i.e., m_1 == m_2.
Dimensions must be > 0.

Definition at line 2588 of file matblock.c.

Error* copy_matblock_block_into_matblock_cd ( Matblock_cd m_1,
uint32_t  mat_offset_1,
uint32_t  row_offset_1,
uint32_t  col_offset_1,
const Matblock_cd m_2,
uint32_t  mat_offset_2,
uint32_t  row_offset_2,
uint32_t  col_offset_2,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a double precision complex floating point matrix block into another.

Parameters:
m_1Matrix block to copy the block into.
mat_offset_1Position of first matrix to copy into m_1.
row_offset_1Position of first row to copy into m_1.
col_offset_1Position of first column to copy into m_1.
m_2Matrix block to copy the block from.
mat_offset_2Position of first matrix to copy from m_2.
row_offset_2Position of first row to copy from m_2.
col_offset_2Position of first column to copy from m_2.
num_matsNumber of matrices to copy.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix block into itself, i.e., m_1 == m_2.
Dimensions must be > 0.

Definition at line 2664 of file matblock.c.

Error* copy_matrix_into_matblock_u32 ( Matblock_u32 **  mb_out,
const Matblock_u32 mb_in,
const Matrix_u32 m,
Matblock_matrix  orient,
uint32_t  index 
)

Copies a 32-bit unsigned integer matrix into a matrix block.

Parameters:
mb_outResult parameter. If *mb_out is NULL, a matrix block is allocated; otherwise its space is re-used.
mb_inMatrix block to copy a matrix into.
mMatrix to copy into the matrix block.
orientOrientation of the matrix to copy into the matrix block.
indexIndex along the orientation dimension to copy the matrix into the matrix block.
Returns:
On success, NULL is returned. On error, an Error is returned and *mb_out is freed and set to NULL (if it is not mb_in).
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.
Note:
If *mb_out == mb_in, then mb_in is overwritten.

Definition at line 2744 of file matblock.c.

Error* copy_matrix_into_matblock_i32 ( Matblock_i32 **  mb_out,
const Matblock_i32 mb_in,
const Matrix_i32 m,
Matblock_matrix  orient,
uint32_t  index 
)

Copies a 32-bit signed integer matrix into a matrix block.

Parameters:
mb_outResult parameter. If *mb_out is NULL, a matrix block is allocated; otherwise its space is re-used.
mb_inMatrix block to copy a matrix into.
mMatrix to copy into the matrix block.
orientOrientation of the matrix to copy into the matrix block.
indexIndex along the orientation dimension to copy the matrix into the matrix block.
Returns:
On success, NULL is returned. On error, an Error is returned and *mb_out is freed and set to NULL (if it is not mb_in).
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.
Note:
If *mb_out == mb_in, then mb_in is overwritten.

Definition at line 2846 of file matblock.c.

Error* copy_matrix_into_matblock_i64 ( Matblock_i64 **  mb_out,
const Matblock_i64 mb_in,
const Matrix_i64 m,
Matblock_matrix  orient,
uint32_t  index 
)

Copies a 32-bit signed integer matrix into a matrix block.

Parameters:
mb_outResult parameter. If *mb_out is NULL, a matrix block is allocated; otherwise its space is re-used.
mb_inMatrix block to copy a matrix into.
mMatrix to copy into the matrix block.
orientOrientation of the matrix to copy into the matrix block.
indexIndex along the orientation dimension to copy the matrix into the matrix block.
Returns:
On success, NULL is returned. On error, an Error is returned and *mb_out is freed and set to NULL (if it is not mb_in).
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.
Note:
If *mb_out == mb_in, then mb_in is overwritten.

Definition at line 2948 of file matblock.c.

Error* copy_matrix_into_matblock_f ( Matblock_f **  mb_out,
const Matblock_f mb_in,
const Matrix_f m,
Matblock_matrix  orient,
uint32_t  index 
)

Copies a 32-bit signed integer matrix into a matrix block.

Parameters:
mb_outResult parameter. If *mb_out is NULL, a matrix block is allocated; otherwise its space is re-used.
mb_inMatrix block to copy a matrix into.
mMatrix to copy into the matrix block.
orientOrientation of the matrix to copy into the matrix block.
indexIndex along the orientation dimension to copy the matrix into the matrix block.
Returns:
On success, NULL is returned. On error, an Error is returned and *mb_out is freed and set to NULL (if it is not mb_in).
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.
Note:
If *mb_out == mb_in, then mb_in is overwritten.

Definition at line 3050 of file matblock.c.

Error* copy_matrix_into_matblock_d ( Matblock_d **  mb_out,
const Matblock_d mb_in,
const Matrix_d m,
Matblock_matrix  orient,
uint32_t  index 
)

Copies a 32-bit signed integer matrix into a matrix block.

Parameters:
mb_outResult parameter. If *mb_out is NULL, a matrix block is allocated; otherwise its space is re-used.
mb_inMatrix block to copy a matrix into.
mMatrix to copy into the matrix block.
orientOrientation of the matrix to copy into the matrix block.
indexIndex along the orientation dimension to copy the matrix into the matrix block.
Returns:
On success, NULL is returned. On error, an Error is returned and *mb_out is freed and set to NULL (if it is not mb_in).
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.
Note:
If *mb_out == mb_in, then mb_in is overwritten.

Definition at line 3152 of file matblock.c.

Error* copy_matrix_into_matblock_cf ( Matblock_cf **  mb_out,
const Matblock_cf mb_in,
const Matrix_cf m,
Matblock_matrix  orient,
uint32_t  index 
)

Copies a 32-bit signed integer matrix into a matrix block.

Parameters:
mb_outResult parameter. If *mb_out is NULL, a matrix block is allocated; otherwise its space is re-used.
mb_inMatrix block to copy a matrix into.
mMatrix to copy into the matrix block.
orientOrientation of the matrix to copy into the matrix block.
indexIndex along the orientation dimension to copy the matrix into the matrix block.
Returns:
On success, NULL is returned. On error, an Error is returned and *mb_out is freed and set to NULL (if it is not mb_in).
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.
Note:
If *mb_out == mb_in, then mb_in is overwritten.

Definition at line 3254 of file matblock.c.

Error* copy_matrix_into_matblock_cd ( Matblock_cd **  mb_out,
const Matblock_cd mb_in,
const Matrix_cd m,
Matblock_matrix  orient,
uint32_t  index 
)

Copies a 32-bit signed integer matrix into a matrix block.

Parameters:
mb_outResult parameter. If *mb_out is NULL, a matrix block is allocated; otherwise its space is re-used.
mb_inMatrix block to copy a matrix into.
mMatrix to copy into the matrix block.
orientOrientation of the matrix to copy into the matrix block.
indexIndex along the orientation dimension to copy the matrix into the matrix block.
Returns:
On success, NULL is returned. On error, an Error is returned and *mb_out is freed and set to NULL (if it is not mb_in).
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.
Note:
If *mb_out == mb_in, then mb_in is overwritten.

Definition at line 3356 of file matblock.c.

Error* copy_matrix_from_matblock_u32 ( Matrix_u32 **  m_out,
const Matblock_u32 mb,
Matblock_matrix  orient,
uint32_t  index 
)

Copies a 32-bit unsigned integer matrix from a matrix block.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
mbMatrix block to copy a matrix from.
orientOrientation of the matrix to copy from the matrix block.
indexIndex along the orientation dimension to copy the matrix from the matrix block.
Returns:
On success, NULL is returned. On error, an Error is returned and *mb_out is freed and set to NULL (if it is not mb_in).
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.

Definition at line 3467 of file matblock.c.

Error* copy_matrix_from_matblock_i32 ( Matrix_i32 **  m_out,
const Matblock_i32 mb,
Matblock_matrix  orient,
uint32_t  index 
)

Copies a 32-bit signed integer matrix from a matrix block.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
mbMatrix block to copy a matrix from.
orientOrientation of the matrix to copy from the matrix block.
indexIndex along the orientation dimension to copy the matrix from the matrix block.
Returns:
On success, NULL is returned. On error, an Error is returned and *mb_out is freed and set to NULL (if it is not mb_in).
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.

Definition at line 3553 of file matblock.c.

Error* copy_matrix_from_matblock_i64 ( Matrix_i64 **  m_out,
const Matblock_i64 mb,
Matblock_matrix  orient,
uint32_t  index 
)

Copies a 32-bit signed integer matrix from a matrix block.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
mbMatrix block to copy a matrix from.
orientOrientation of the matrix to copy from the matrix block.
indexIndex along the orientation dimension to copy the matrix from the matrix block.
Returns:
On success, NULL is returned. On error, an Error is returned and *mb_out is freed and set to NULL (if it is not mb_in).
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.

Definition at line 3639 of file matblock.c.

Error* copy_matrix_from_matblock_f ( Matrix_f **  m_out,
const Matblock_f mb,
Matblock_matrix  orient,
uint32_t  index 
)

Copies a 32-bit signed integer matrix from a matrix block.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
mbMatrix block to copy a matrix from.
orientOrientation of the matrix to copy from the matrix block.
indexIndex along the orientation dimension to copy the matrix from the matrix block.
Returns:
On success, NULL is returned. On error, an Error is returned and *mb_out is freed and set to NULL (if it is not mb_in).
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.

Definition at line 3725 of file matblock.c.

Error* copy_matrix_from_matblock_d ( Matrix_d **  m_out,
const Matblock_d mb,
Matblock_matrix  orient,
uint32_t  index 
)

Copies a 32-bit signed integer matrix from a matrix block.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
mbMatrix block to copy a matrix from.
orientOrientation of the matrix to copy from the matrix block.
indexIndex along the orientation dimension to copy the matrix from the matrix block.
Returns:
On success, NULL is returned. On error, an Error is returned and *mb_out is freed and set to NULL (if it is not mb_in).
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.

Definition at line 3811 of file matblock.c.

Error* copy_matrix_from_matblock_cf ( Matrix_cf **  m_out,
const Matblock_cf mb,
Matblock_matrix  orient,
uint32_t  index 
)

Copies a 32-bit signed integer matrix from a matrix block.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
mbMatrix block to copy a matrix from.
orientOrientation of the matrix to copy from the matrix block.
indexIndex along the orientation dimension to copy the matrix from the matrix block.
Returns:
On success, NULL is returned. On error, an Error is returned and *mb_out is freed and set to NULL (if it is not mb_in).
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.

Definition at line 3897 of file matblock.c.

Error* copy_matrix_from_matblock_cd ( Matrix_cd **  m_out,
const Matblock_cd mb,
Matblock_matrix  orient,
uint32_t  index 
)

Copies a 32-bit signed integer matrix from a matrix block.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
mbMatrix block to copy a matrix from.
orientOrientation of the matrix to copy from the matrix block.
indexIndex along the orientation dimension to copy the matrix from the matrix block.
Returns:
On success, NULL is returned. On error, an Error is returned and *mb_out is freed and set to NULL (if it is not mb_in).
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.

Definition at line 3983 of file matblock.c.

void free_matblock_u8 ( Matblock_u8 m)

Frees a 8-bit unsigned integer matrix block.

Parameters:
mMatrix block to free.

Definition at line 4068 of file matblock.c.

void free_matblock_u32 ( Matblock_u32 m)

Frees a 32-bit unsigned integer matrix block.

Parameters:
mMatrix block to free.

Definition at line 4079 of file matblock.c.

void free_matblock_i32 ( Matblock_i32 m)

Frees a 32-bit signed integer matrix block.

Parameters:
mMatrix block to free.

Definition at line 4090 of file matblock.c.

void free_matblock_i64 ( Matblock_i64 m)

Frees a 64-bit signed integer matrix block.

Parameters:
mMatrix block to free.

Definition at line 4101 of file matblock.c.

void free_matblock_f ( Matblock_f m)

Frees a single precision floating point matrix block.

Parameters:
mMatrix block to free.

Definition at line 4112 of file matblock.c.

void free_matblock_d ( Matblock_d m)

Frees a double precision floating point matrix block.

Parameters:
mMatrix block to free.

Definition at line 4123 of file matblock.c.

void free_matblock_cf ( Matblock_cf m)

Frees a single precision complex floating point matrix block.

Parameters:
mMatrix block to free.

Definition at line 4134 of file matblock.c.

void free_matblock_cd ( Matblock_cd m)

Frees a double precision complex floating point matrix block.

Parameters:
mMatrix block to free.

Definition at line 4145 of file matblock.c.