AbstractLinAlgPack_AssertOp.cpp File Reference

#include <stdexcept>
#include <string>
#include <typeinfo>
#include "AbstractLinAlgPack_AssertOp.hpp"
#include "AbstractLinAlgPack_VectorSpace.hpp"
#include "AbstractLinAlgPack_VectorMutable.hpp"
#include "AbstractLinAlgPack_MatrixOp.hpp"
#include "Teuchos_TestForException.hpp"

Include dependency graph for AbstractLinAlgPack_AssertOp.cpp:

Go to the source code of this file.

Defines

#define ASSERT_LHS_ARG(FUNC_NAME, LHS_ARG)
#define ASSERT_VEC_SPACES_NAMES(FUNC_NAME, VS1, VS1_NAME, VS2, VS2_NAME)
#define ASSERT_VEC_SPACES(FUNC_NAME, VS1, VS2)   ASSERT_VEC_SPACES_NAMES(FUNC_NAME,VS1,#VS1,VS2,#VS2)
#define ASSERT_MAT_VEC_SPACES(FUNC_NAME, M, M_T, M_VS, VS)
#define ASSERT_MAT_MAT_SPACES(FUNC_NAME, M1, M1_T, M1_VS, M2, M2_T, M2_VS)

Enumerations

enum  EM_VS { SPACE_COLS, SPACE_ROWS }

Functions

std::ostream & operator<< (std::ostream &o, const dump_vec_spaces &d)
const AbstractLinAlgPack::VectorSpaceop (const AbstractLinAlgPack::MatrixOp &M, BLAS_Cpp::Transp M_trans, EM_VS M_VS)

Variables

const AbstractLinAlgPack::VectorSpacevec_space1
const char * vec_space1_name
const AbstractLinAlgPack::VectorSpacevec_space2
const char * vec_space2_name


Define Documentation

#define ASSERT_LHS_ARG ( FUNC_NAME,
LHS_ARG   ) 

Value:

TEST_FOR_EXCEPTION(                                                                   \
    (LHS_ARG) == NULL, std::invalid_argument                                       \
    ,FUNC_NAME << " : Error!"                                                      \
    );

Definition at line 95 of file AbstractLinAlgPack_AssertOp.cpp.

#define ASSERT_VEC_SPACES_NAMES ( FUNC_NAME,
VS1,
VS1_NAME,
VS2,
VS2_NAME   ) 

Value:

{                                                                                      \
  const bool is_compatible = (VS1).is_compatible(VS2);                               \
  TEST_FOR_EXCEPTION(                                                                   \
    !is_compatible, VectorSpace::IncompatibleVectorSpaces                          \
    ,FUNC_NAME << " : " << dump_vec_spaces(VS1,VS1_NAME,VS2,VS2_NAME)              \
    )                                                                              \
}

Definition at line 105 of file AbstractLinAlgPack_AssertOp.cpp.

#define ASSERT_VEC_SPACES ( FUNC_NAME,
VS1,
VS2   )     ASSERT_VEC_SPACES_NAMES(FUNC_NAME,VS1,#VS1,VS2,#VS2)

Definition at line 114 of file AbstractLinAlgPack_AssertOp.cpp.

#define ASSERT_MAT_VEC_SPACES ( FUNC_NAME,
M,
M_T,
M_VS,
VS   ) 

Value:

{                                                                                         \
  std::ostringstream M_VS_name;                                                         \
  M_VS_name << "(" #M << ( M_T == BLAS_Cpp::no_trans ? "" : "'" ) << ")"                \
         << "." << ( M_VS == SPACE_COLS ? "space_cols()" : "space_rows()" );        \
  ASSERT_VEC_SPACES_NAMES(                                                              \
    FUNC_NAME                                                                         \
    ,op(M,M_T,M_VS),M_VS_name.str().c_str()                                           \
    ,VS,#VS                                                                           \
    )                                                                                 \
}

Definition at line 117 of file AbstractLinAlgPack_AssertOp.cpp.

#define ASSERT_MAT_MAT_SPACES ( FUNC_NAME,
M1,
M1_T,
M1_VS,
M2,
M2_T,
M2_VS   ) 

Value:

{                                                                                         \
  std::ostringstream M1_VS_name, M2_VS_name;                                            \
  M1_VS_name << "(" #M1 << ( M1_T == BLAS_Cpp::no_trans ? "" : "'" ) << ")" \
         << "." << ( M1_VS == SPACE_COLS ? "space_cols()" : "space_rows()" );       \
  M2_VS_name << "(" #M2 << ( M2_T == BLAS_Cpp::no_trans ? "" : "'" ) << ")" \
         << "." << ( M2_VS == SPACE_COLS ? "space_cols()" : "space_rows()" );       \
  ASSERT_VEC_SPACES_NAMES(                                                              \
    FUNC_NAME                                                                         \
    ,op(M1,M1_T,M1_VS),M1_VS_name.str().c_str()                                       \
    ,op(M2,M2_T,M2_VS),M2_VS_name.str().c_str()                                       \
    )                                                                                 \
}

Definition at line 129 of file AbstractLinAlgPack_AssertOp.cpp.


Enumeration Type Documentation

enum EM_VS

Enumerator:
SPACE_COLS 
SPACE_ROWS 

Definition at line 73 of file AbstractLinAlgPack_AssertOp.cpp.


Function Documentation

std::ostream& @0::operator<< ( std::ostream &  o,
const dump_vec_spaces &  d 
) [static]

Definition at line 61 of file AbstractLinAlgPack_AssertOp.cpp.

const AbstractLinAlgPack::VectorSpace& @0::op ( const AbstractLinAlgPack::MatrixOp M,
BLAS_Cpp::Transp  M_trans,
EM_VS  M_VS 
) [static]

Definition at line 75 of file AbstractLinAlgPack_AssertOp.cpp.


Variable Documentation

const AbstractLinAlgPack::VectorSpace& vec_space1

Definition at line 52 of file AbstractLinAlgPack_AssertOp.cpp.

const char* vec_space1_name

Definition at line 53 of file AbstractLinAlgPack_AssertOp.cpp.

const AbstractLinAlgPack::VectorSpace& vec_space2

Definition at line 54 of file AbstractLinAlgPack_AssertOp.cpp.

const char* vec_space2_name

Definition at line 55 of file AbstractLinAlgPack_AssertOp.cpp.


Generated on Tue Jul 13 09:30:55 2010 for MOOCHO (Single Doxygen Collection) by  doxygen 1.4.7