2
0
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:
Jörg Walter
2002-11-10 10:38:54 +00:00
parent 36bd1471d6
commit d4535394ee
72 changed files with 5430 additions and 6236 deletions

View File

@@ -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"
;

View File

@@ -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;
}

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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