<T>LAPACK 0.1.1
C++ Template Linear Algebra PACKage
Loading...
Searching...
No Matches
utils.hpp File Reference
Include dependency graph for utils.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define tlapack_expr_with_2vectors(x, TX, n, X, incx, y, TY, m, Y, incy, expr)
 Creates two vector objects and executes an expression with them.
 
#define tlapack_expr_with_vector(x, TX, n, X, incx, expr)
 Creates a vector object and executes an expression with it.
 
#define tlapack_expr_with_vector_positiveInc(x, TX, n, X, incx, expr)
 Creates a vector object and executes an expression with it.
 

Detailed Description

Author
Weslley S Pereira, University of Colorado Denver, USA

Macro Definition Documentation

◆ tlapack_expr_with_2vectors

#define tlapack_expr_with_2vectors (   x,
  TX,
  n,
  X,
  incx,
  y,
  TY,
  m,
  Y,
  incy,
  expr 
)
Value:
do { \
using tlapack::legacy::internal::create_vector; \
using tlapack::legacy::internal::create_backward_vector; \
if (incx == 1) { \
auto x = create_vector((TX*)X, n); \
tlapack_expr_with_vector(y, TY, m, Y, incy, expr); \
} \
else if (incx == -1) { \
auto x = create_backward_vector((TX*)X, n); \
tlapack_expr_with_vector(y, TY, m, Y, incy, expr); \
} \
else if (incx > 1) { \
auto x = create_vector((TX*)X, n, incx); \
tlapack_expr_with_vector(y, TY, m, Y, incy, expr); \
} \
else { \
auto x = create_backward_vector((TX*)X, n, -incx); \
tlapack_expr_with_vector(y, TY, m, Y, incy, expr); \
} \
} while (false)

Creates two vector objects and executes an expression with them.

Parameters
[in]xName of the first vector to be used in the expression.
[in]TXType of the elements of the first vector.
[in]nNumber of elements in the first vector.
[in]XPointer to the first element of the first vector.
[in]incxStride between elements of the first vector.
[in]yName of the second vector to be used in the expression.
[in]TYType of the elements of the second vector.
[in]mNumber of elements in the second vector.
[in]YPointer to the first element of the second vector.
[in]incyStride between elements of the second vector.
[in]exprExpression to be executed.

◆ tlapack_expr_with_vector

#define tlapack_expr_with_vector (   x,
  TX,
  n,
  X,
  incx,
  expr 
)
Value:
do { \
using tlapack::legacy::internal::create_vector; \
using tlapack::legacy::internal::create_backward_vector; \
if (incx == 1) { \
auto x = create_vector((TX*)X, n); \
expr; \
} \
else if (incx == -1) { \
auto x = create_backward_vector((TX*)X, n); \
expr; \
} \
else if (incx > 1) { \
auto x = create_vector((TX*)X, n, incx); \
expr; \
} \
else { \
auto x = create_backward_vector((TX*)X, n, -incx); \
expr; \
} \
} while (false)

Creates a vector object and executes an expression with it.

Parameters
[in]xName of the vector to be used in the expression.
[in]TXType of the elements of the vector.
[in]nNumber of elements in the vector.
[in]XPointer to the first element of the vector.
[in]incxStride between elements of the vector.
[in]exprExpression to be executed with the vector.

◆ tlapack_expr_with_vector_positiveInc

#define tlapack_expr_with_vector_positiveInc (   x,
  TX,
  n,
  X,
  incx,
  expr 
)
Value:
do { \
using tlapack::legacy::internal::create_vector; \
if (incx == 1) { \
auto x = create_vector((TX*)X, n); \
expr; \
} \
else { \
auto x = create_vector((TX*)X, n, incx); \
expr; \
} \
} while (false)

Creates a vector object and executes an expression with it.

This macro is used when the stride between elements of the vector is non-negative.

Parameters
[in]xName of the vector to be used in the expression.
[in]TXType of the elements of the vector.
[in]nNumber of elements in the vector.
[in]XPointer to the first element of the vector.
[in]incxStride between elements of the vector.
[in]exprExpression to be executed with the vector.