|
Boost-Commit : |
From: thomas.klimpel_at_[hidden]
Date: 2008-05-18 13:48:34
Author: klimpel
Date: 2008-05-18 13:48:34 EDT (Sun, 18 May 2008)
New Revision: 45492
URL: http://svn.boost.org/trac/boost/changeset/45492
Log:
msvc 9.0 doesn't accept the functor.template operator()< T > (...) syntax
Text files modified:
sandbox/libs/numeric/bindings/blas/test/blas.hpp | 8 ++++----
sandbox/libs/numeric/bindings/blas/test/blas2.cpp | 22 +++++++++++-----------
2 files changed, 15 insertions(+), 15 deletions(-)
Modified: sandbox/libs/numeric/bindings/blas/test/blas.hpp
==============================================================================
--- sandbox/libs/numeric/bindings/blas/test/blas.hpp (original)
+++ sandbox/libs/numeric/bindings/blas/test/blas.hpp 2008-05-18 13:48:34 EDT (Sun, 18 May 2008)
@@ -184,7 +184,7 @@
os << std::setw(12) << normed_time << std::setw(12) << mflops ;
}
-template < typename T, typename FunctorType >
+template < typename FunctorType >
void loop(std::ostream& os, int start, int step, int stop, int runs, FunctorType functor)
{
for(int size_i = start ; size_i <= stop ; size_i = std::max( static_cast< int >( size_i * (1 + 1.0 / step ) ), size_i + 1 ) ) {
@@ -193,14 +193,14 @@
std::cerr << size_i << "\t";
os << size_i << "\t";
- functor.template operator()< T >( os, stop, size_i, runs, runs_i ) ;
+ functor.operator()( os, stop, size_i, runs, runs_i ) ;
std::cerr << std::endl;
os << std::endl;
}
}
-template < typename T, typename FunctorType, typename CallFunctor >
+template < typename FunctorType, typename CallFunctor >
void loop(std::ostream& os, int start, int step, int stop, int runs, FunctorType functor, CallFunctor ublas_call)
{
for(int size_i = start ; size_i <= stop ; size_i = std::max( static_cast< int >( size_i * (1 + 1.0 / step ) ), size_i + 1 ) ) {
@@ -209,7 +209,7 @@
std::cerr << size_i << "\t";
os << size_i << "\t";
- functor.template operator()< T >( os, stop, size_i, runs, runs_i, ublas_call ) ;
+ functor.operator()( os, stop, size_i, runs, runs_i, ublas_call ) ;
std::cerr << std::endl;
os << std::endl;
Modified: sandbox/libs/numeric/bindings/blas/test/blas2.cpp
==============================================================================
--- sandbox/libs/numeric/bindings/blas/test/blas2.cpp (original)
+++ sandbox/libs/numeric/bindings/blas/test/blas2.cpp 2008-05-18 13:48:34 EDT (Sun, 18 May 2008)
@@ -38,9 +38,9 @@
check( y_native.begin(), y_native.end(), y_toblas.begin() );
}
+template < typename T >
struct gemv_matrix_vector_vector
{
- template < typename T >
void operator()(std::ostream& os, int size, int size_i, int runs, int runs_i)
{
runs_i = std::max( 1, runs_i / size_i ) ;
@@ -58,9 +58,9 @@
}
};
+template < typename T >
struct gemv_trans_matrix_vector_vector
{
- template < typename T >
void operator()(std::ostream& os, int size, int size_i, int runs, int runs_i)
{
runs_i = std::max( 1, runs_i / size_i ) ;
@@ -78,9 +78,9 @@
}
};
+template < typename T >
struct gemv_conj_matrix_vector_vector
{
- template < typename T >
void operator()(std::ostream& os, int size, int size_i, int runs, int runs_i)
{
runs_i = std::max( 1, runs_i / size_i ) ;
@@ -98,9 +98,9 @@
}
};
+template < typename T >
struct gemv_matrix_range_vector_vector
{
- template < typename T >
void operator()(std::ostream& os, int size, int size_i, int runs, int runs_i)
{
runs_i = std::max( 1, runs_i / size_i ) ;
@@ -159,43 +159,43 @@
{
std::cerr << "gemv_matrix_vector_vector_double" << std::endl ;
std::ofstream stream("gemv_matrix_vector_vector_double");
- loop< double, gemv_matrix_vector_vector >( stream, start, step, stop, runs, gemv_matrix_vector_vector() ) ;
+ loop( stream, start, step, stop, runs, gemv_matrix_vector_vector<double>() ) ;
}
{
std::cerr << "gemv_matrix_vector_vector_double_complex" << std::endl ;
std::ofstream stream("gemv_matrix_vector_vector_double_complex");
- loop< std::complex<double>, gemv_matrix_vector_vector >( stream, start, step, stop, runs, gemv_matrix_vector_vector() ) ;
+ loop( stream, start, step, stop, runs, gemv_matrix_vector_vector<std::complex<double> >() ) ;
}
{
std::cerr << "gemv_trans_matrix_vector_vector_double" << std::endl ;
std::ofstream stream("gemv_trans_matrix_vector_vector_double");
- loop< double, gemv_trans_matrix_vector_vector >( stream, start, step, stop, runs, gemv_trans_matrix_vector_vector() ) ;
+ loop( stream, start, step, stop, runs, gemv_trans_matrix_vector_vector<double>() ) ;
}
{
std::cerr << "gemv_trans_matrix_vector_vector_double_complex" << std::endl ;
std::ofstream stream("gemv_trans_matrix_vector_vector_double_complex");
- loop< std::complex<double>, gemv_trans_matrix_vector_vector >( stream, start, step, stop, runs, gemv_trans_matrix_vector_vector() ) ;
+ loop( stream, start, step, stop, runs, gemv_trans_matrix_vector_vector<std::complex<double> >() ) ;
}
{
std::cerr << "gemv_conj_matrix_vector_vector_double_complex" << std::endl ;
std::ofstream stream("gemv_conj_matrix_vector_vector_double_complex");
- loop< std::complex<double>, gemv_conj_matrix_vector_vector >( stream, start, step, stop, runs, gemv_conj_matrix_vector_vector() ) ;
+ loop( stream, start, step, stop, runs, gemv_conj_matrix_vector_vector<std::complex<double> >() ) ;
}
{
std::cerr << "gemv_matrix_range_vector_vector_double" << std::endl ;
std::ofstream stream("gemv_matrix_range_vector_vector_double");
- loop< double, gemv_matrix_range_vector_vector >( stream, start, step, stop, runs, gemv_matrix_range_vector_vector() ) ;
+ loop( stream, start, step, stop, runs, gemv_matrix_range_vector_vector<double>() ) ;
}
{
std::cerr << "gemv_matrix_range_vector_vector_double_complex" << std::endl ;
std::ofstream stream("gemv_matrix_range_vector_vector_double_complex");
- loop< std::complex<double>, gemv_matrix_range_vector_vector >( stream, start, step, stop, runs, gemv_matrix_range_vector_vector() ) ;
+ loop( stream, start, step, stop, runs, gemv_matrix_range_vector_vector<std::complex<double> >() ) ;
}
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk