vector.h File Reference

Multivector view implementation. More...

#include <oski/mangle.h>

Go to the source code of this file.

Data Structures

struct  oski_vecstruct_t
 Multivector view structure. More...

Defines

#define INC_OSKI_VECTOR_H
 oski/vector.h included.
#define MAKE_VECSTRUCT_INIT(m, n, orient, stride, rowinc, colinc, val)   {m, n, orient, stride, rowinc, colinc, val}
 Macro for initializing a declared oski_vecstruct_t variable.
#define VECRM_GET(v, i, j, s)   (v)[(i)*(s) + (j)]
 Get the (i, j) element from an array v stored in row-major layout with stride s.
#define VECCM_GET(v, i, j, s)   (v)[(i) + (j)*(s)]
 Get the (i, j) element from an array v stored in column-major layout with stride s.
#define VECVIEW_GET(x, i, j)
 Get the (i, j) element of an arbitrary vector view.
#define IS_VECVIEW_COLVEC(x)   ((x)->num_cols == 1)
 Returns 1 if x is a column vector.
#define IS_VECVIEW_COLVEC_STRIDE1(x)
 Returns 1 if x is a unit stride column vector.


Detailed Description

Multivector view implementation.


Define Documentation

#define INC_OSKI_VECTOR_H

oski/vector.h included.

#define IS_VECVIEW_COLVEC (  )     ((x)->num_cols == 1)

Returns 1 if x is a column vector.

#define IS_VECVIEW_COLVEC_STRIDE1 (  ) 

Value:

( \
        IS_VECVIEW_COLVEC(x) \
        && ( \
            (((x)->orient == LAYOUT_ROWMAJ) && ((x)->stride == 1)) \
            || (((x)->orient == LAYOUT_COLMAJ)) \
        ) \
    )
Returns 1 if x is a unit stride column vector.

#define MAKE_VECSTRUCT_INIT ( m,
n,
orient,
stride,
rowinc,
colinc,
val   )     {m, n, orient, stride, rowinc, colinc, val}

Macro for initializing a declared oski_vecstruct_t variable.

#define VECCM_GET ( v,
i,
j,
 )     (v)[(i) + (j)*(s)]

Get the (i, j) element from an array v stored in column-major layout with stride s.

Parameters:
[in] v Raw vector array storage.
[in] i Row index (zero-based).
[in] j Column index (zero-based).
[in] s Stride (leading-dimension).
Returns:
The logical (i, j) element of v when v is interpreted as a 2-D array stored in column-major layout.

Referenced by oski_PrintDebugVecView(), and ZeroDenseMatColmaj().

#define VECRM_GET ( v,
i,
j,
 )     (v)[(i)*(s) + (j)]

Get the (i, j) element from an array v stored in row-major layout with stride s.

Parameters:
[in] v Raw vector array storage.
[in] i Row index (zero-based).
[in] j Column index (zero-based).
[in] s Stride (leading-dimension).
Returns:
The logical (i, j) element of v when v is interpreted as a 2-D array stored in row-major layout.

Referenced by oski_PrintDebugVecView(), and ZeroDenseMatRowmaj().

#define VECVIEW_GET ( x,
i,
 ) 

Value:

(((x)->orient == LAYOUT_ROWMAJ) \
        ? VECRM_GET((x)->val, i, j, (x)->stride) \
        : VECCM_GET((x)->val, i, j, (x)->stride) \
    )
Get the (i, j) element of an arbitrary vector view.

Parameters:
[in] x Vector view object (handle).
[in] i Row index (zero-based).
[in] j Column index (zero-based).
Returns:
The logical (i, j) element of x.

Referenced by oski_PrintDebugVecView().


Generated on Fri Apr 8 22:35:20 2011 for BeBOP Optimized Sparse Kernel Interface Library by  doxygen 1.5.9