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

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

Definition at line 73 of file AbstractLinAlgPack_AssertOp.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Wed Apr 13 10:11:04 2011 for MOOCHO (Single Doxygen Collection) by  doxygen 1.6.3