M4RIE  0.20120415
 All Data Structures Files Functions Variables Defines
Functions
Operations on rows

Functions

static void mzd_slice_rescale_row (mzd_slice_t *A, rci_t r, rci_t c, word *X)
 Recale the row r in A by X starting c.
static void mzd_slice_row_swap (mzd_slice_t *A, const rci_t rowa, const rci_t rowb)
 Swap the two rows rowa and rowb.
static void mzd_slice_copy_row (mzd_slice_t *B, size_t i, const mzd_slice_t *A, size_t j)
 copy row j from A to row i from B.
static void mzd_slice_col_swap (mzd_slice_t *A, const rci_t cola, const rci_t colb)
 Swap the two columns cola and colb.
static void mzd_slice_row_add (mzd_slice_t *A, const rci_t sourcerow, const rci_t destrow)
 Add the rows sourcerow and destrow and stores the total in the row destrow.
static void mzd_slice_row_clear_offset (mzd_slice_t *A, const rci_t row, const rci_t coloffset)
 Clear the given row, but only begins at the column coloffset.
void mzed_add_multiple_of_row (mzed_t *A, rci_t ar, const mzed_t *B, rci_t br, word *X, rci_t start_col)
static void mzed_add_row (mzed_t *A, rci_t ar, const mzed_t *B, rci_t br, rci_t start_col)
static void mzed_rescale_row (mzed_t *A, rci_t r, rci_t start_col, const word *X)
 Rescale the row r in A by X starting c.
static void mzed_row_swap (mzed_t *M, const rci_t rowa, const rci_t rowb)
 Swap the two rows rowa and rowb.
static void mzed_copy_row (mzed_t *B, rci_t i, const mzed_t *A, rci_t j)
 copy row j from A to row i from B.
static void mzed_col_swap (mzed_t *M, const rci_t cola, const rci_t colb)
 Swap the two columns cola and colb.
static void mzed_col_swap_in_rows (mzed_t *A, const rci_t cola, const rci_t colb, const rci_t start_row, rci_t stop_row)
 Swap the two columns cola and colb but only between start_row and stop_row.
static void mzed_row_add (mzed_t *M, const rci_t sourcerow, const rci_t destrow)
 Add the rows sourcerow and destrow and stores the total in the row destrow.
static rci_t mzed_first_zero_row (mzed_t *A)
 Return the first row with all zero entries.
static void mzed_row_clear_offset (mzed_t *M, const rci_t row, const rci_t coloffset)
 Clear the given row, but only begins at the column coloffset.
static void mzed_process_rows (mzed_t *M, const rci_t startrow, const rci_t endrow, rci_t startcol, const njt_mzed_t *T)
 The function looks up 6 entries from position i,startcol in each row and adds the appropriate row from T to the row i.
static void mzed_process_rows2 (mzed_t *M, const rci_t startrow, const rci_t endrow, const rci_t startcol, const njt_mzed_t *T0, const njt_mzed_t *T1)
 Same as mzed_process_rows but works with two Newton-John tables in parallel.
static void mzed_process_rows3 (mzed_t *M, const rci_t startrow, const rci_t endrow, const rci_t startcol, const njt_mzed_t *T0, const njt_mzed_t *T1, const njt_mzed_t *T2)
 Same as mzed_process_rows but works with three Newton-John tables in parallel.
static void mzed_process_rows4 (mzed_t *M, const rci_t startrow, const rci_t endrow, const rci_t startcol, const njt_mzed_t *T0, const njt_mzed_t *T1, const njt_mzed_t *T2, const njt_mzed_t *T3)
 Same as mzed_process_rows but works with four Newton-John tables in parallel.
static void mzed_process_rows5 (mzed_t *M, const rci_t startrow, const rci_t endrow, const rci_t startcol, const njt_mzed_t *T0, const njt_mzed_t *T1, const njt_mzed_t *T2, const njt_mzed_t *T3, const njt_mzed_t *T4)
 Same as mzed_process_rows but works with five Newton-John tables in parallel.
static void mzed_process_rows6 (mzed_t *M, const rci_t startrow, const rci_t endrow, const rci_t startcol, const njt_mzed_t *T0, const njt_mzed_t *T1, const njt_mzed_t *T2, const njt_mzed_t *T3, const njt_mzed_t *T4, const njt_mzed_t *T5)
 Same as mzed_process_rows but works with six Newton-John tables in parallel.

Function Documentation

static void mzd_slice_col_swap ( mzd_slice_t A,
const rci_t  cola,
const rci_t  colb 
) [inline, static]

Swap the two columns cola and colb.

Parameters:
AMatrix.
colaColumn index.
colbColumn index.
static void mzd_slice_copy_row ( mzd_slice_t B,
size_t  i,
const mzd_slice_t A,
size_t  j 
) [inline, static]

copy row j from A to row i from B.

The offsets of A and B must match and the number of columns of A must be less than or equal to the number of columns of B.

Parameters:
BTarget matrix.
iTarget row index.
ASource matrix.
jSource row index.
static void mzd_slice_rescale_row ( mzd_slice_t A,
rci_t  r,
rci_t  c,
word *  X 
) [inline, static]

Recale the row r in A by X starting c.

Parameters:
AMatrix
rRow index.
cColumn index.
XMultiplier
static void mzd_slice_row_add ( mzd_slice_t A,
const rci_t  sourcerow,
const rci_t  destrow 
) [inline, static]

Add the rows sourcerow and destrow and stores the total in the row destrow.

Parameters:
AMatrix
sourcerowIndex of source row
destrowIndex of target row
Note:
this can be done much faster with mzd_combine.
static void mzd_slice_row_clear_offset ( mzd_slice_t A,
const rci_t  row,
const rci_t  coloffset 
) [inline, static]

Clear the given row, but only begins at the column coloffset.

Parameters:
AMatrix
rowIndex of row
coloffsetColumn offset
static void mzd_slice_row_swap ( mzd_slice_t A,
const rci_t  rowa,
const rci_t  rowb 
) [inline, static]

Swap the two rows rowa and rowb.

Parameters:
AMatrix
rowaRow index.
rowbRow index.
void mzed_add_multiple_of_row ( mzed_t A,
rci_t  ar,
const mzed_t B,
rci_t  br,
word *  X,
rci_t  start_col 
)

A[ar,c] = A[ar,c] + X*B[br,c] for all c >= startcol.

Parameters:
AMatrix.
arRow index in A.
BMatrix.
brRow index in B.
XLookup table for multiplication with some finite field element x.
start_colColumn index.
static void mzed_add_row ( mzed_t A,
rci_t  ar,
const mzed_t B,
rci_t  br,
rci_t  start_col 
) [inline, static]

A[ar,c] = A[ar,c] + B[br,c] for all c >= startcol.

Parameters:
AMatrix.
arRow index in A.
BMatrix.
brRow index in B.
start_colColumn index.
static void mzed_col_swap ( mzed_t M,
const rci_t  cola,
const rci_t  colb 
) [inline, static]

Swap the two columns cola and colb.

Parameters:
MMatrix.
colaColumn index.
colbColumn index.
static void mzed_col_swap_in_rows ( mzed_t A,
const rci_t  cola,
const rci_t  colb,
const rci_t  start_row,
rci_t  stop_row 
) [inline, static]

Swap the two columns cola and colb but only between start_row and stop_row.

Parameters:
AMatrix.
colaColumn index.
colbColumn index.
start_rowRow index.
stop_rowRow index (exclusive).
static void mzed_copy_row ( mzed_t B,
rci_t  i,
const mzed_t A,
rci_t  j 
) [inline, static]

copy row j from A to row i from B.

The offsets of A and B must match and the number of columns of A must be less than or equal to the number of columns of B.

Parameters:
BTarget matrix.
iTarget row index.
ASource matrix.
jSource row index.
static rci_t mzed_first_zero_row ( mzed_t A) [inline, static]

Return the first row with all zero entries.

If no such row can be found returns nrows.

Parameters:
AMatrix
static void mzed_process_rows ( mzed_t M,
const rci_t  startrow,
const rci_t  endrow,
rci_t  startcol,
const njt_mzed_t T 
) [inline, static]

The function looks up 6 entries from position i,startcol in each row and adds the appropriate row from T to the row i.

This process is iterated for i from startrow to stoprow (exclusive).

Parameters:
MMatrix to operate on
startrowtop row which is operated on
endrowbottom row which is operated on
startcolStarting column for addition
TNewton-John table
static void mzed_process_rows2 ( mzed_t M,
const rci_t  startrow,
const rci_t  endrow,
const rci_t  startcol,
const njt_mzed_t T0,
const njt_mzed_t T1 
) [inline, static]

Same as mzed_process_rows but works with two Newton-John tables in parallel.

Parameters:
MMatrix to operate on
startrowtop row which is operated on
endrowbottom row which is operated on
startcolStarting column for addition
T0Newton-John table
T1Newton-John table
static void mzed_process_rows3 ( mzed_t M,
const rci_t  startrow,
const rci_t  endrow,
const rci_t  startcol,
const njt_mzed_t T0,
const njt_mzed_t T1,
const njt_mzed_t T2 
) [inline, static]

Same as mzed_process_rows but works with three Newton-John tables in parallel.

Parameters:
MMatrix to operate on
startrowtop row which is operated on
endrowbottom row which is operated on
startcolStarting column for addition
T0Newton-John table
T1Newton-John table
T2Newton-John table
static void mzed_process_rows4 ( mzed_t M,
const rci_t  startrow,
const rci_t  endrow,
const rci_t  startcol,
const njt_mzed_t T0,
const njt_mzed_t T1,
const njt_mzed_t T2,
const njt_mzed_t T3 
) [inline, static]

Same as mzed_process_rows but works with four Newton-John tables in parallel.

Parameters:
MMatrix to operate on
startrowtop row which is operated on
endrowbottom row which is operated on
startcolStarting column for addition
T0Newton-John table
T1Newton-John table
T2Newton-John table
T3Newton-John table
static void mzed_process_rows5 ( mzed_t M,
const rci_t  startrow,
const rci_t  endrow,
const rci_t  startcol,
const njt_mzed_t T0,
const njt_mzed_t T1,
const njt_mzed_t T2,
const njt_mzed_t T3,
const njt_mzed_t T4 
) [inline, static]

Same as mzed_process_rows but works with five Newton-John tables in parallel.

Parameters:
MMatrix to operate on
startrowtop row which is operated on
endrowbottom row which is operated on
startcolStarting column for addition
T0Newton-John table
T1Newton-John table
T2Newton-John table
T3Newton-John table
T4Newton-John table
static void mzed_process_rows6 ( mzed_t M,
const rci_t  startrow,
const rci_t  endrow,
const rci_t  startcol,
const njt_mzed_t T0,
const njt_mzed_t T1,
const njt_mzed_t T2,
const njt_mzed_t T3,
const njt_mzed_t T4,
const njt_mzed_t T5 
) [inline, static]

Same as mzed_process_rows but works with six Newton-John tables in parallel.

Parameters:
MMatrix to operate on
startrowtop row which is operated on
endrowbottom row which is operated on
startcolStarting column for addition
T0Newton-John table
T1Newton-John table
T2Newton-John table
T3Newton-John table
T4Newton-John table
T5Newton-John table
static void mzed_rescale_row ( mzed_t A,
rci_t  r,
rci_t  start_col,
const word *  X 
) [inline, static]

Rescale the row r in A by X starting c.

Parameters:
AMatrix
rRow index.
start_colColumn index.
XMultiplier
static void mzed_row_add ( mzed_t M,
const rci_t  sourcerow,
const rci_t  destrow 
) [inline, static]

Add the rows sourcerow and destrow and stores the total in the row destrow.

Parameters:
MMatrix
sourcerowIndex of source row
destrowIndex of target row
Note:
this can be done much faster with mzed_combine.
static void mzed_row_clear_offset ( mzed_t M,
const rci_t  row,
const rci_t  coloffset 
) [inline, static]

Clear the given row, but only begins at the column coloffset.

Parameters:
MMatrix
rowIndex of row
coloffsetColumn offset
static void mzed_row_swap ( mzed_t M,
const rci_t  rowa,
const rci_t  rowb 
) [inline, static]

Swap the two rows rowa and rowb.

Parameters:
MMatrix
rowaRow index.
rowbRow index.