mirror of
https://github.com/boostorg/ublas.git
synced 2026-02-27 17:32:09 +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:
@@ -201,6 +201,7 @@ void bench_1<T, N>::operator () (int runs) {
|
||||
header ("C array");
|
||||
bench_c_inner_prod<T, N> () (runs);
|
||||
|
||||
#ifdef USE_SPARSE_VECTOR
|
||||
#ifdef USE_MAP_ARRAY
|
||||
header ("sparse_vector<map_array>");
|
||||
bench_my_inner_prod<ublas::sparse_vector<T, ublas::map_array<std::size_t, T> >, N> () (runs);
|
||||
@@ -210,17 +211,29 @@ void bench_1<T, N>::operator () (int runs) {
|
||||
header ("sparse_vector<std::map>");
|
||||
bench_my_inner_prod<ublas::sparse_vector<T, std::map<std::size_t, T> >, N> () (runs);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef USE_COMPRESSED_VECTOR
|
||||
header ("compressed_vector");
|
||||
bench_my_inner_prod<ublas::compressed_vector<T>, N> () (runs);
|
||||
#endif
|
||||
|
||||
#ifdef USE_COORDINATE_VECTOR
|
||||
header ("coordinate_vector");
|
||||
bench_my_inner_prod<ublas::coordinate_vector<T>, N> () (runs);
|
||||
#endif
|
||||
|
||||
#ifdef USE_STD_VALARRAY
|
||||
header ("std::valarray");
|
||||
bench_cpp_inner_prod<std::valarray<T>, N> () (runs);
|
||||
#endif
|
||||
|
||||
header ("sparse_vector + sparse_vector");
|
||||
header ("vector + vector");
|
||||
|
||||
header ("C array");
|
||||
bench_c_vector_add<T, N> () (runs);
|
||||
|
||||
#ifdef USE_SPARSE_VECTOR
|
||||
#ifdef USE_MAP_ARRAY
|
||||
header ("sparse_vector<map_array> safe");
|
||||
bench_my_vector_add<ublas::sparse_vector<T, ublas::map_array<std::size_t, T> >, N> () (runs, safe_tag ());
|
||||
@@ -236,6 +249,27 @@ void bench_1<T, N>::operator () (int runs) {
|
||||
header ("sparse_vector<std::map> fast");
|
||||
bench_my_vector_add<ublas::sparse_vector<T, std::map<std::size_t, T> >, N> () (runs, fast_tag ());
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef USE_COMPRESSED_VECTOR
|
||||
#ifdef USE_MAP_ARRAY
|
||||
header ("compressed_vector safe");
|
||||
bench_my_vector_add<ublas::compressed_vector<T>, N> () (runs, safe_tag ());
|
||||
|
||||
header ("compressed_vector fast");
|
||||
bench_my_vector_add<ublas::compressed_vector<T>, N> () (runs, fast_tag ());
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef USE_COORDINATE_VECTOR
|
||||
#ifdef USE_MAP_ARRAY
|
||||
header ("coordinate_vector safe");
|
||||
bench_my_vector_add<ublas::coordinate_vector<T>, N> () (runs, safe_tag ());
|
||||
|
||||
header ("coordinate_vector fast");
|
||||
bench_my_vector_add<ublas::coordinate_vector<T>, N> () (runs, fast_tag ());
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef USE_STD_VALARRAY
|
||||
header ("std::valarray");
|
||||
@@ -243,28 +277,34 @@ void bench_1<T, N>::operator () (int runs) {
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef USE_FLOAT
|
||||
template struct bench_1<float, 3>;
|
||||
template struct bench_1<float, 10>;
|
||||
template struct bench_1<float, 30>;
|
||||
template struct bench_1<float, 100>;
|
||||
#endif
|
||||
|
||||
#ifdef USE_DOUBLE
|
||||
template struct bench_1<double, 3>;
|
||||
template struct bench_1<double, 10>;
|
||||
template struct bench_1<double, 30>;
|
||||
template struct bench_1<double, 100>;
|
||||
#endif
|
||||
|
||||
#ifdef USE_STD_COMPLEX
|
||||
|
||||
#ifdef USE_FLOAT
|
||||
template struct bench_1<std::complex<float>, 3>;
|
||||
template struct bench_1<std::complex<float>, 10>;
|
||||
template struct bench_1<std::complex<float>, 30>;
|
||||
template struct bench_1<std::complex<float>, 100>;
|
||||
#endif
|
||||
|
||||
#ifdef USE_DOUBLE
|
||||
template struct bench_1<std::complex<double>, 3>;
|
||||
template struct bench_1<std::complex<double>, 10>;
|
||||
template struct bench_1<std::complex<double>, 30>;
|
||||
template struct bench_1<std::complex<double>, 100>;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user