Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64841 - in sandbox/odeint/branches/karsten: boost/numeric/odeint/algebra boost/numeric/odeint/stepper libs/numeric/odeint/ideas libs/numeric/odeint/test libs/numeric/odeint/test/thrust
From: karsten.ahnert_at_[hidden]
Date: 2010-08-16 05:38:39


Author: karsten
Date: 2010-08-16 05:38:33 EDT (Mon, 16 Aug 2010)
New Revision: 64841
URL: http://svn.boost.org/trac/boost/changeset/64841

Log:
reorganizing this branch
Added:
   sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/
   sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/algebra_dispatcher.hpp
      - copied unchanged from r64840, /sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/idea_algebra_dispatcher.hpp
   sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/odeint_ref_problem.cpp (contents, props changed)
   sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/operations_dispatcher.hpp
      - copied unchanged from r64840, /sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/idea_operations_dispatcher.hpp
Removed:
   sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/gsl_vector_adaptor.hpp
   sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/idea_algebra_dispatcher.hpp
   sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/idea_operations_dispatcher.hpp
   sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/thrust_algebra.hpp
   sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/thrust_operations.hpp
   sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/thrust_resize.hpp
Text files modified:
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/adjust_size.hpp | 6 +++---
   sandbox/odeint/branches/karsten/libs/numeric/odeint/test/Jamfile | 10 +++++-----
   sandbox/odeint/branches/karsten/libs/numeric/odeint/test/thrust/Makefile | 29 +++++++++++++++++++++++++++--
   sandbox/odeint/branches/karsten/libs/numeric/odeint/test/thrust/check_thrust.cu | 7 ++++---
   4 files changed, 39 insertions(+), 13 deletions(-)

Deleted: sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/gsl_vector_adaptor.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/gsl_vector_adaptor.hpp 2010-08-16 05:38:33 EDT (Mon, 16 Aug 2010)
+++ (empty file)
@@ -1,214 +0,0 @@
-/*
- boost header: xyz/gsl_vector_adaptor.hpp
-
- Copyright 2009 Karsten Ahnert
- Copyright 2009 Mario Mulansky
- Copyright 2009 Andre Bergner
-
- Distributed under the Boost Software License, Version 1.0.
- (See accompanying file LICENSE_1_0.txt or
- copy at http://www.boost.org/LICENSE_1_0.txt)
-*/
-
-#ifndef BOOST_NUMERIC_ODEINT_GSL_VECTOR_ADAPTOR_HPP_INCLUDED
-#define BOOST_NUMERIC_ODEINT_GSL_VECTOR_ADAPTOR_HPP_INCLUDED
-
-#include <new>
-#include <iostream>
-
-#include <gsl/gsl_vector.h>
-
-#include <boost/range.hpp>
-#include <boost/iterator/iterator_facade.hpp>
-
-using namespace std;
-
-
-
-
-class const_gsl_vector_iterator;
-
-/*
- * defines an iterator for gsl_vector
- */
-class gsl_vector_iterator : public boost::iterator_facade< gsl_vector_iterator , double , boost::random_access_traversal_tag >
-{
-public :
-
- gsl_vector_iterator( void ): m_p(0) , m_stride( 0 ) { }
- explicit gsl_vector_iterator( gsl_vector &p ) : m_p( p.data ) , m_stride( p.stride ) { }
- friend gsl_vector_iterator end_iterator( gsl_vector & );
-
-private :
-
- friend class boost::iterator_core_access;
- friend class const_gsl_vector_iterator;
-
- void increment( void ) { m_p += m_stride; }
- void decrement( void ) { m_p -= m_stride; }
- void advance( ptrdiff_t n ) { m_p += n*m_stride; }
- bool equal( const gsl_vector_iterator &other ) const { return this->m_p == other.m_p; }
- bool equal( const const_gsl_vector_iterator &other ) const;
- double& dereference( void ) const { return *m_p; }
-
- double *m_p;
- size_t m_stride;
-};
-
-
-
-/*
- * defines an const iterator for gsl_vector
- */
-class const_gsl_vector_iterator : public boost::iterator_facade< const_gsl_vector_iterator , const double , boost::random_access_traversal_tag >
-{
-public :
-
- const_gsl_vector_iterator( void ): m_p(0) , m_stride( 0 ) { }
- explicit const_gsl_vector_iterator( const gsl_vector &p ) : m_p( p.data ) , m_stride( p.stride ) { }
- const_gsl_vector_iterator( const gsl_vector_iterator &p ) : m_p( p.m_p ) , m_stride( p.m_stride ) { }
-
-private :
-
- friend class boost::iterator_core_access;
- friend class gsl_vector_iterator;
- friend const_gsl_vector_iterator end_iterator( const gsl_vector & );
-
- void increment( void ) { m_p += m_stride; }
- void decrement( void ) { m_p -= m_stride; }
- void advance( ptrdiff_t n ) { m_p += n*m_stride; }
- bool equal( const const_gsl_vector_iterator &other ) const { return this->m_p == other.m_p; }
- bool equal( const gsl_vector_iterator &other ) const { return this->m_p == other.m_p; }
- const double& dereference( void ) const { return *m_p; }
-
- const double *m_p;
- size_t m_stride;
-};
-
-
-bool gsl_vector_iterator::equal( const const_gsl_vector_iterator &other ) const { return this->m_p == other.m_p; }
-
-
-gsl_vector_iterator end_iterator( gsl_vector &x )
-{
- gsl_vector_iterator iter( x );
- iter.m_p += iter.m_stride * x.size;
- return iter;
-}
-
-const_gsl_vector_iterator end_iterator( const gsl_vector &x )
-{
- const_gsl_vector_iterator iter( x );
- iter.m_p += iter.m_stride * x.size;
- return iter;
-}
-
-
-
-
-
-
-namespace boost
-{
- template<>
- struct range_mutable_iterator< gsl_vector >
- {
- typedef gsl_vector_iterator type;
- };
-
- template<>
- struct range_const_iterator< gsl_vector >
- {
- typedef const_gsl_vector_iterator type;
- };
-} // namespace boost
-
-
-
-
-// template<>
-inline gsl_vector_iterator range_begin( gsl_vector &x )
-{
- return gsl_vector_iterator( x );
-}
-
-// template<>
-inline const_gsl_vector_iterator range_begin( const gsl_vector &x )
-{
- return const_gsl_vector_iterator( x );
-}
-
-// template<>
-inline gsl_vector_iterator range_end( gsl_vector &x )
-{
- return end_iterator( x );
-}
-
-// template<>
-inline const_gsl_vector_iterator range_end( const gsl_vector &x )
-{
- return end_iterator( x );
-}
-
-
-
-
-
-
-
-namespace boost {
-namespace numeric {
-namespace odeint {
-
-
-template<>
-struct is_resizeable< gsl_vector >
-{
- struct type : public boost::true_type { };
- const static bool value = type::value;
-};
-
-
-template<>
-void resize( const gsl_vector &x , gsl_vector &dxdt )
-{
- // ToDo : the vector could be uninitialized
- if( dxdt.owner != 0 )
- {
- gsl_block_free( dxdt.block );
- }
- dxdt.size = 0;
-
- if( x.size == 0 ) return;
-
- gsl_block *block = gsl_block_alloc( x.size );
- if( block == 0 ) throw std::bad_alloc( );
-
- dxdt.data = block->data ;
- dxdt.size = x.size;
- dxdt.stride = 1;
- dxdt.block = block;
- dxdt.owner = 1;
-}
-
-template<>
-bool same_size( const gsl_vector &x1 , const gsl_vector &x2 )
-{
- return x1.size == x2.size;
-}
-
-template<>
-void adjust_size( const gsl_vector &x1 , gsl_vector &x2 )
-{
- if( !same_size( x1 , x2 ) ) resize( x1 , x2 );
-}
-
-
-} // odeint
-} // numeric
-} // boost
-
-
-
-
-#endif // BOOST_NUMERIC_ODEINT_GSL_VECTOR_ADAPTOR_HPP_INCLUDED

Deleted: sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/idea_algebra_dispatcher.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/idea_algebra_dispatcher.hpp 2010-08-16 05:38:33 EDT (Mon, 16 Aug 2010)
+++ (empty file)
@@ -1,39 +0,0 @@
-/*
- boost header: BOOST_NUMERIC_ODEINT/algebra_dispatcher.hpp
-
- Copyright 2009 Karsten Ahnert
- Copyright 2009 Mario Mulansky
- Copyright 2009 Andre Bergner
-
- Distributed under the Boost Software License, Version 1.0.
- (See accompanying file LICENSE_1_0.txt or
- copy at http://www.boost.org/LICENSE_1_0.txt)
-*/
-
-#ifndef BOOST_BOOST_NUMERIC_ODEINT_ALGEBRA_DISPATCHER_HPP_INCLUDED
-#define BOOST_BOOST_NUMERIC_ODEINT_ALGEBRA_DISPATCHER_HPP_INCLUDED
-
-namespace boost {
-namespace numeric {
-namespace odeint {
-
-
-/*
- * ToDo : Implement
- */
-template< class Container , class Time >
-struct algebra_dispatcher
-{
- typedef Container container_type;
- typedef Time time_type;
-
- typedef standard_algebra< container_type > type;
-};
-
-
-} // odeint
-} // numeric
-} // boost
-
-
-#endif //BOOST_BOOST_NUMERIC_ODEINT_ALGEBRA_DISPATCHER_HPP_INCLUDED

Deleted: sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/idea_operations_dispatcher.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/idea_operations_dispatcher.hpp 2010-08-16 05:38:33 EDT (Mon, 16 Aug 2010)
+++ (empty file)
@@ -1,35 +0,0 @@
-/*
- boost header: BOOST_NUMERIC_ODEINT/operations_dispatcher.hpp
-
- Copyright 2009 Karsten Ahnert
- Copyright 2009 Mario Mulansky
- Copyright 2009 Andre Bergner
-
- Distributed under the Boost Software License, Version 1.0.
- (See accompanying file LICENSE_1_0.txt or
- copy at http://www.boost.org/LICENSE_1_0.txt)
-*/
-
-#ifndef BOOST_BOOST_NUMERIC_ODEINT_OPERATIONS_DISPATCHER_HPP_INCLUDED
-#define BOOST_BOOST_NUMERIC_ODEINT_OPERATIONS_DISPATCHER_HPP_INCLUDED
-
-namespace boost {
-namespace numeric {
-namespace odeint {
-
-/*
- * ToDo : implement
- */
-template< class Container , class Time >
-struct operations_dispatcher
-{
- typedef standard_operations< Time > type;
-};
-
-
-} // odeint
-} // numeric
-} // boost
-
-
-#endif //BOOST_BOOST_NUMERIC_ODEINT_OPERATIONS_DISPATCHER_HPP_INCLUDED

Deleted: sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/thrust_algebra.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/thrust_algebra.hpp 2010-08-16 05:38:33 EDT (Mon, 16 Aug 2010)
+++ (empty file)
@@ -1,41 +0,0 @@
-/*
- boost header: BOOST_NUMERIC_ODEINT/thrust_algebra.hpp
-
- Copyright 2009 Karsten Ahnert
- Copyright 2009 Mario Mulansky
-
- Distributed under the Boost Software License, Version 1.0.
- (See accompanying file LICENSE_1_0.txt or
- copy at http://www.boost.org/LICENSE_1_0.txt)
-*/
-
-#ifndef BOOST_BOOST_NUMERIC_ODEINT_THRUST_ALGEBRA_HPP_INCLUDED
-#define BOOST_BOOST_NUMERIC_ODEINT_THRUST_ALGEBRA_HPP_INCLUDED
-
-#include <thrust/device_vector.h>
-#include <thrust/for_each.h>
-#include <thrust/iterator/zip_iterator.h>
-
-namespace boost {
-namespace numeric {
-namespace odeint {
-
-
-struct thrust_algebra
-{
- template< class StateType1 , class StateType2 , class Operation >
- static void transform2( StateType1 &s1 , StateType2 &s2 , Operation op )
- {
- thrust::for_each( thrust::make_zip_iterator( thrust::make_tuple( boost::begin(s1) , boost::begin(s2) ) ) ,
- thrust::make_zip_iterator( thrust::make_tuple( boost::end(s1) , boost::end(s2) ) ) ,
- op);
- }
-};
-
-
-} // odeint
-} // numeric
-} // boost
-
-
-#endif //BOOST_BOOST_NUMERIC_ODEINT_THRUST_ALGEBRA_HPP_INCLUDED

Deleted: sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/thrust_operations.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/thrust_operations.hpp 2010-08-16 05:38:33 EDT (Mon, 16 Aug 2010)
+++ (empty file)
@@ -1,47 +0,0 @@
-/*
- boost header: BOOST_NUMERIC_ODEINT/thrust_operations.hpp
-
- Copyright 2009 Karsten Ahnert
- Copyright 2009 Mario Mulansky
-
- Distributed under the Boost Software License, Version 1.0.
- (See accompanying file LICENSE_1_0.txt or
- copy at http://www.boost.org/LICENSE_1_0.txt)
-*/
-
-#ifndef BOOST_BOOST_NUMERIC_ODEINT_THRUST_OPERATIONS_HPP_INCLUDED
-#define BOOST_BOOST_NUMERIC_ODEINT_THRUST_OPERATIONS_HPP_INCLUDED
-
-namespace boost {
-namespace numeric {
-namespace odeint {
-
-#include <thrust/iterator/zip_iterator.h>
-
-
-template< class Time >
-struct thrust_operations
-{
- typedef Time time_type;
-
- struct increment
- {
- time_type m_dt;
-
- increment( time_type dt ) : m_dt( dt ) { }
-
- template< class Tuple >
- __host__ __device__
- void operator()( Tuple t ) const
- {
- thrust::get<0>(t) += m_dt * thrust::get<1>(t);
- }
- };
-};
-
-} // odeint
-} // numeric
-} // boost
-
-
-#endif //BOOST_BOOST_NUMERIC_ODEINT_THRUST_OPERATIONS_HPP_INCLUDED

Deleted: sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/thrust_resize.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/thrust_resize.hpp 2010-08-16 05:38:33 EDT (Mon, 16 Aug 2010)
+++ (empty file)
@@ -1,42 +0,0 @@
-/*
- boost header: BOOST_NUMERIC_ODEINT/thrust_resize.hpp
-
- Copyright 2009 Karsten Ahnert
- Copyright 2009 Mario Mulansky
-
- Distributed under the Boost Software License, Version 1.0.
- (See accompanying file LICENSE_1_0.txt or
- copy at http://www.boost.org/LICENSE_1_0.txt)
-*/
-
-#ifndef BOOST_BOOST_NUMERIC_ODEINT_THRUST_RESIZE_HPP_INCLUDED
-#define BOOST_BOOST_NUMERIC_ODEINT_THRUST_RESIZE_HPP_INCLUDED
-
-#include <thrust/device_vector.h>
-#include <thrust/host_vector.h>
-
-
-namespace boost {
-namespace numeric {
-namespace odeint {
-
-template< class T >
-struct is_resizeable< thrust::device_vector< T > >
-{
- struct type : public boost::true_type { };
- const static bool value = type::value;
-};
-
-template< class T >
-struct is_resizeable< thrust::host_vector< T > >
-{
- struct type : public boost::true_type { };
- const static bool value = type::value;
-};
-
-} // odeint
-} // numeric
-} // boost
-
-
-#endif //BOOST_BOOST_NUMERIC_ODEINT_TR1_ARRAY_RESIZE_HPP_INCLUDED

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/adjust_size.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/adjust_size.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/adjust_size.hpp 2010-08-16 05:38:33 EDT (Mon, 16 Aug 2010)
@@ -71,7 +71,7 @@
 
         void register_state( size_t idx , State &x )
         {
- states.replace( idx , &x );
+ m_states.replace( idx , &x );
         }
 
 
@@ -79,7 +79,7 @@
 
         void adjust_size_by_resizeability( const State &x , boost::true_type )
         {
- for( size_t i=0 ; i<Dim ; ++i ) boost::numeric::odeint::adjust_size( x , states[i] );
+ for( size_t i=0 ; i<Dim ; ++i ) boost::numeric::odeint::adjust_size( x , m_states[i] );
                 // adjust_size_impl( x );
         }
 
@@ -91,7 +91,7 @@
 private :
 
         bool m_is_initialized;
- boost::ptr_array< State , Dim , boost::view_clone_allocator > states;
+ boost::ptr_array< State , Dim , boost::view_clone_allocator > m_states;
 };
 
 

Added: sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/odeint_ref_problem.cpp
==============================================================================
--- (empty file)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/odeint_ref_problem.cpp 2010-08-16 05:38:33 EDT (Mon, 16 Aug 2010)
@@ -0,0 +1,162 @@
+//============================================================================
+// Name : odeint_ref_problem.cpp
+// Author : Karsten Ahnert
+// Version :
+// Copyright : Your copyright notice
+// Description : Hello World in C++, Ansi-style
+//============================================================================
+
+#include <iostream>
+#include <ostream>
+#include <tr1/array>
+
+#include <boost/function.hpp>
+#include <boost/utility.hpp>
+
+#include <boost/accumulators/accumulators.hpp>
+#include <boost/accumulators/statistics.hpp>
+
+#include <boost/timer.hpp>
+
+#include <boost/numeric/odeint.hpp>
+
+#define tab "\t"
+
+using namespace std;
+
+typedef boost::accumulators::accumulator_set<
+ double , boost::accumulators::stats<
+ boost::accumulators::tag::mean ,
+ boost::accumulators::tag::variance
+ >
+ > accumulator_type;
+
+typedef boost::timer timer_type;
+
+ostream& operator<<( ostream& out , accumulator_type &acc )
+{
+ out << boost::accumulators::mean( acc ) << tab;
+// out << boost::accumulators::variance( acc ) << tab;
+ return out;
+}
+
+
+
+
+class explicit_euler
+{
+public:
+
+ typedef double value_type;
+ typedef std::tr1::array< double , 3 > state_type;
+ typedef boost::function3< void , const state_type& , state_type& , value_type > func_type;
+
+ void do_step( func_type system , state_type &x , value_type t , value_type dt )
+ {
+ system( x , m_dxdt , t );
+ for( size_t i=0 ; i<x.size() ; ++i ) x[i] += dt * m_dxdt[i];
+ };
+
+private:
+
+ state_type m_dxdt;
+};
+
+typedef explicit_euler::value_type value_type;
+typedef explicit_euler::state_type state_type;
+
+ostream& operator<<( ostream& out , const state_type &x )
+{
+ out << x[0] << tab << x[1] << tab << x[2];
+ return out;
+}
+
+const value_type sigma = 10.0;
+const value_type R = 28.0;
+const value_type b = 8.0 / 3.0;
+
+
+void lorenz( const state_type &x , state_type &dxdt , value_type t )
+{
+ dxdt[0] = sigma * ( x[1] - x[0] );
+ dxdt[1] = R * x[0] - x[1] - x[0] * x[2];
+ dxdt[2] = x[0]*x[1] - b * x[2];
+}
+
+struct lorenz_class
+{
+ void operator()( const state_type &x , state_type &dxdt , value_type t )
+ {
+ dxdt[0] = sigma * ( x[1] - x[0] );
+ dxdt[1] = R * x[0] - x[1] - x[0] * x[2];
+ dxdt[2] = x[0]*x[1] - b * x[2];
+ }
+};
+
+
+int main()
+{
+ explicit_euler euler1;
+ boost::numeric::odeint::stepper_euler< state_type > euler2;
+ const value_type dt = 0.01;
+ lorenz_class lorenz_c;
+
+ timer_type timer;
+ accumulator_type acc1 , acc2 , acc3 , acc4 , acc5 , acc6;
+ double elapsed;
+ const size_t num_of_steps = 1024 * 1024 * 32;
+
+ while( true )
+ {
+ state_type x = {{ drand48() , drand48() , drand48() }};
+ state_type x1( x ) , x2( x ) , x3( x ) , x4( x ) , x5( x ) , x6( x );
+
+ timer.restart();
+ for( size_t i = 0 ; i<num_of_steps ; ++i )
+ euler1.do_step( lorenz , x1 , 0.0 , dt );
+ elapsed = timer.elapsed();
+ acc1( elapsed );
+// clog << "Method 1 with function pointer : " << elapsed << tab << x1 << endl;
+
+ timer.restart();
+ for( size_t i = 0 ; i<num_of_steps ; ++i )
+ euler1.do_step( lorenz_class() , x2 , 0.0 , dt );
+ elapsed = timer.elapsed();
+ acc2( elapsed );
+// clog << "Method 1 with class : " << elapsed << tab << x2 << endl;
+
+ timer.restart();
+ for( size_t i = 0 ; i<num_of_steps ; ++i )
+ euler1.do_step( lorenz_c , x3 , 0.0 , dt );
+ elapsed = timer.elapsed();
+ acc3( elapsed );
+// clog << "Method 1 with class and copying : " << elapsed << tab << x3 << endl;
+
+ timer.restart();
+ for( size_t i = 0 ; i<num_of_steps ; ++i )
+ euler1.do_step( boost::ref( lorenz_c ) , x4 , 0.0 , dt );
+ elapsed = timer.elapsed();
+ acc4( elapsed );
+// clog << "Method 1 with class and boost::ref : " << elapsed << tab << x4 << endl;
+
+ timer.restart();
+ for( size_t i = 0 ; i<num_of_steps ; ++i )
+ euler2.do_step( lorenz , x5 , 0.0 , dt );
+ elapsed = timer.elapsed();
+ acc5( elapsed );
+// clog << "Method 2 with function pointer : " << elapsed << tab << x5 << endl;
+
+ timer.restart();
+ for( size_t i = 0 ; i<num_of_steps ; ++i )
+ euler2.do_step( lorenz_c , x6 , 0.0 , dt );
+ elapsed = timer.elapsed();
+ acc6( elapsed );
+// clog << "Method 2 with class reference : " << elapsed << tab << x6 << endl;
+ cout << x1 << tab << x2 << tab << x3 << tab << x4 << tab << x5 << tab << x6 << endl;
+
+
+ clog << acc1 << tab << acc2 << tab << acc3 << tab << acc4 << tab << acc5 << tab << acc6 << endl;
+ }
+
+ return 0;
+}

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/test/Jamfile
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/test/Jamfile (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/test/Jamfile 2010-08-16 05:38:33 EDT (Mon, 16 Aug 2010)
@@ -40,11 +40,11 @@
               :
               : <link>static
       ]
- [ run check_implicit_euler.cpp
- :
- :
- : <link>static
- ]
+# [ run check_implicit_euler.cpp
+# :
+# :
+# : <link>static
+# ]
     ;
 
 

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/test/thrust/Makefile
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/test/thrust/Makefile (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/test/thrust/Makefile 2010-08-16 05:38:33 EDT (Mon, 16 Aug 2010)
@@ -1,2 +1,27 @@
-check_thrust: check_thrust.cu
- nvcc check_thrust.cu -I../../../../.. -I${BOOST_ROOT} -o check_thrust
\ No newline at end of file
+CUDA_ROOT = /usr/local/cuda
+
+CC = g++
+CXX = g++
+NVCC = $(CUDA_ROOT)/bin/nvcc
+
+INCLUDES += -I$(BOOST_ROOT) -I$(THRUST_ROOT) -I$(CUDA_ROOT)/include -I../../../../..
+
+NVCCFLAGS = -O3 $(INCLUDES) -arch sm_13
+
+LDLIBS = -lcudart
+LDFLAGS = -L$(CUDA_ROOT)/lib64
+
+%.co : %.cu
+ $(NVCC) $(NVCCFLAGS) -o $@ -c $<
+
+
+all : check_thrust
+
+
+check_thrust : check_thrust.co
+ $(CC) -o check_thrust $(LDFLAGS) $(LDLIBS) check_thrust.co
+check_thrust.co : check_thrust.cu
+
+clean :
+ -rm *~ *.o *.co check_thrust
+

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/test/thrust/check_thrust.cu
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/test/thrust/check_thrust.cu (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/test/thrust/check_thrust.cu 2010-08-16 05:38:33 EDT (Mon, 16 Aug 2010)
@@ -13,9 +13,10 @@
 //#include <boost/test/unit_test.hpp>
 
 #include <boost/numeric/odeint.hpp>
-#include <boost/numeric/odeint/algebra/thrust_algebra.hpp>
-#include <boost/numeric/odeint/algebra/thrust_operations.hpp>
-#include <boost/numeric/odeint/algebra/thrust_resize.hpp>
+#include <boost/numeric/odeint/algebra/external/thrust_algebra.hpp>
+#include <boost/numeric/odeint/algebra/external/thrust_operations.hpp>
+#include <boost/numeric/odeint/algebra/external/thrust_resize.hpp>
+
 #include <thrust/device_vector.h>
 #include <thrust/fill.h>
 


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