mirror of
https://github.com/boostorg/ublas.git
synced 2026-02-26 17:12:10 +00:00
Many bugfixes and improvements, especially related to sparse matrices.
Thanks namely to Kresimir Fresl and Michael Stevens this time.
This commit is contained in:
@@ -5,7 +5,7 @@ SOURCES = test2 test21 test22 test23 ;
|
||||
exe test2
|
||||
: $(SOURCES).cpp
|
||||
: <include>$(BOOST_ROOT)
|
||||
<debug><define>BOOST_UBLAS_TYPE_CHECK
|
||||
<define>BOOST_UBLAS_SAFE
|
||||
<borland><*><cxxflags>"-w-8026 -w-8027 -w-8057 -w-8084 -w-8092"
|
||||
;
|
||||
|
||||
|
||||
@@ -33,49 +33,76 @@ int main () {
|
||||
|
||||
std::cout << "test_blas_1" << std::endl;
|
||||
|
||||
#ifdef USE_FLOAT
|
||||
std::cout << "float" << std::endl;
|
||||
test_blas_1<ublas::vector<float>, 3> () ();
|
||||
#endif
|
||||
|
||||
#ifdef USE_DOUBLE
|
||||
std::cout << "double" << std::endl;
|
||||
test_blas_1<ublas::vector<double>, 3> () ();
|
||||
#endif
|
||||
|
||||
#ifdef USE_STD_COMPLEX
|
||||
#ifdef USE_FLOAT
|
||||
std::cout << "std::complex<float>" << std::endl;
|
||||
test_blas_1<ublas::vector<std::complex<float> >, 3> () ();
|
||||
#endif
|
||||
|
||||
#ifdef USE_DOUBLE
|
||||
std::cout << "std::complex<double>" << std::endl;
|
||||
test_blas_1<ublas::vector<std::complex<double> >, 3> () ();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
std::cout << "test_blas_2" << std::endl;
|
||||
|
||||
#ifdef USE_FLOAT
|
||||
std::cout << "float" << std::endl;
|
||||
test_blas_2<ublas::vector<float>, ublas::matrix<float>, 3> () ();
|
||||
#endif
|
||||
|
||||
#ifdef USE_DOUBLE
|
||||
std::cout << "double" << std::endl;
|
||||
test_blas_2<ublas::vector<double>, ublas::matrix<double>, 3> () ();
|
||||
#endif
|
||||
|
||||
#ifdef USE_STD_COMPLEX
|
||||
#ifdef USE_FLOAT
|
||||
std::cout << "std::complex<float>" << std::endl;
|
||||
test_blas_2<ublas::vector<std::complex<float> >, ublas::matrix<std::complex<float> >, 3> () ();
|
||||
#endif
|
||||
|
||||
#ifdef USE_DOUBLE
|
||||
std::cout << "std::complex<double>" << std::endl;
|
||||
test_blas_2<ublas::vector<std::complex<double> >, ublas::matrix<std::complex<double> >, 3> () ();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
std::cout << "test_blas_3" << std::endl;
|
||||
|
||||
#ifdef USE_FLOAT
|
||||
std::cout << "float" << std::endl;
|
||||
test_blas_3<ublas::matrix<float>, 3> () ();
|
||||
#endif
|
||||
|
||||
#ifdef USE_DOUBLE
|
||||
std::cout << "double" << std::endl;
|
||||
test_blas_3<ublas::matrix<double>, 3> () ();
|
||||
#endif
|
||||
|
||||
#ifdef USE_STD_COMPLEX
|
||||
#ifdef USE_FLOAT
|
||||
std::cout << "std::complex<float>" << std::endl;
|
||||
test_blas_3<ublas::matrix<std::complex<float> >, 3> () ();
|
||||
#endif
|
||||
|
||||
#ifdef USE_DOUBLE
|
||||
std::cout << "std::complex<double>" << std::endl;
|
||||
test_blas_3<ublas::matrix<std::complex<double> >, 3> () ();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -65,8 +65,10 @@ struct test_blas_3 {
|
||||
void operator () ();
|
||||
};
|
||||
|
||||
// #define USE_STD_COMPLEX
|
||||
#define USE_FLOAT
|
||||
#define USE_DOUBLE
|
||||
#define USE_STD_COMPLEX
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -88,10 +88,20 @@ void test_blas_1<V, N>::operator () () {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef USE_FLOAT
|
||||
template struct test_blas_1<ublas::vector<float>, 3>;
|
||||
#endif
|
||||
|
||||
#ifdef USE_DOUBLE
|
||||
template struct test_blas_1<ublas::vector<double>, 3>;
|
||||
#endif
|
||||
|
||||
#ifdef USE_STD_COMPLEX
|
||||
#ifdef USE_FLOAT
|
||||
template struct test_blas_1<ublas::vector<std::complex<float> >, 3>;
|
||||
#endif
|
||||
|
||||
#ifdef USE_DOUBLE
|
||||
template struct test_blas_1<ublas::vector<std::complex<double> >, 3>;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -140,11 +140,21 @@ void test_blas_2<V, M, N>::operator () () {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef USE_FLOAT
|
||||
template struct test_blas_2<ublas::vector<float>, ublas::matrix<float>, 3>;
|
||||
template struct test_blas_2<ublas::vector<double>, ublas::matrix<double>, 3>;
|
||||
|
||||
#ifdef USE_STD_COMPLEX
|
||||
template struct test_blas_2<ublas::vector<std::complex<float> >, ublas::matrix<std::complex<float> >, 3>;
|
||||
template struct test_blas_2<ublas::vector<std::complex<double> >, ublas::matrix<std::complex<double> >, 3>;
|
||||
#endif
|
||||
|
||||
#ifdef USE_DOUBLE
|
||||
template struct test_blas_2<ublas::vector<double>, ublas::matrix<double>, 3>;
|
||||
#endif
|
||||
|
||||
#ifdef USE_STD_COMPLEX
|
||||
#ifdef USE_FLOAT
|
||||
template struct test_blas_2<ublas::vector<std::complex<float> >, ublas::matrix<std::complex<float> >, 3>;
|
||||
#endif
|
||||
|
||||
#ifdef USE_DOUBLE
|
||||
template struct test_blas_2<ublas::vector<std::complex<double> >, ublas::matrix<std::complex<double> >, 3>;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -201,10 +201,20 @@ void test_blas_3<M, N>::operator () () {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef USE_FLOAT
|
||||
template struct test_blas_3<ublas::matrix<float>, 3>;
|
||||
#endif
|
||||
|
||||
#ifdef USE_DOUBLE
|
||||
template struct test_blas_3<ublas::matrix<double>, 3>;
|
||||
#endif
|
||||
|
||||
#ifdef USE_STD_COMPLEX
|
||||
#ifdef USE_FLOAT
|
||||
template struct test_blas_3<ublas::matrix<std::complex<float> >, 3>;
|
||||
#endif
|
||||
|
||||
#ifdef USE_DOUBLE
|
||||
template struct test_blas_3<ublas::matrix<std::complex<double> >, 3>;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user