|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53420 - sandbox/task/libs/task/examples
From: oliver.kowalke_at_[hidden]
Date: 2009-05-29 18:42:44
Author: olli
Date: 2009-05-29 18:42:43 EDT (Fri, 29 May 2009)
New Revision: 53420
URL: http://svn.boost.org/trac/boost/changeset/53420
Log:
* some additons
Text files modified:
sandbox/task/libs/task/examples/bind_to_processors.cpp | 6 +++---
sandbox/task/libs/task/examples/delay.cpp | 2 +-
sandbox/task/libs/task/examples/fork_join.cpp | 4 ++--
sandbox/task/libs/task/examples/reschedule_until.cpp | 2 +-
sandbox/task/libs/task/examples/yield.cpp | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
Modified: sandbox/task/libs/task/examples/bind_to_processors.cpp
==============================================================================
--- sandbox/task/libs/task/examples/bind_to_processors.cpp (original)
+++ sandbox/task/libs/task/examples/bind_to_processors.cpp 2009-05-29 18:42:43 EDT (Fri, 29 May 2009)
@@ -77,11 +77,11 @@
pool_type pool;
std::vector< tsk::handle< long > > results;
- results.reserve( 15);
+ results.reserve( 10);
pt::ptime start( pt::microsec_clock::universal_time() );
- for ( int i = 0; i < 15; ++i)
+ for ( int i = 0; i < 10; ++i)
results.push_back(
tsk::async(
pool,
@@ -97,7 +97,7 @@
std::vector< tsk::handle< long > >::iterator i( results.begin() );
i != e;
++i)
- std::cout << "fibonacci " << k++ << " == " << i->get() << std::endl;
+ std::cout << "fibonacci(" << k++ << ") == " << i->get() << std::endl;
pt::ptime stop( pt::microsec_clock::universal_time() );
std::cout << ( stop - start).total_milliseconds() << " milli seconds" << std::endl;
Modified: sandbox/task/libs/task/examples/delay.cpp
==============================================================================
--- sandbox/task/libs/task/examples/delay.cpp (original)
+++ sandbox/task/libs/task/examples/delay.cpp 2009-05-29 18:42:43 EDT (Fri, 29 May 2009)
@@ -69,7 +69,7 @@
{
fib_task a( 5);
long result = a.execute( n);
- printf("n == %d, fibonnaci == %d\n", n, result);
+ printf("fibonnaci(%ld) == %ld\n", n, result);
}
int main( int argc, char *argv[])
Modified: sandbox/task/libs/task/examples/fork_join.cpp
==============================================================================
--- sandbox/task/libs/task/examples/fork_join.cpp (original)
+++ sandbox/task/libs/task/examples/fork_join.cpp 2009-05-29 18:42:43 EDT (Fri, 29 May 2009)
@@ -58,7 +58,7 @@
pool_type pool( tsk::poolsize( 5) );
std::vector< tsk::handle< long > > results;
- results.reserve( 15);
+ results.reserve( 10);
pt::ptime start( pt::microsec_clock::universal_time() );
@@ -79,7 +79,7 @@
std::vector< tsk::handle< long > >::iterator i( results.begin() );
i != e;
++i)
- std::cout << "fibonacci " << k++ << " == " << i->get() << std::endl;
+ std::cout << "fibonacci(" << k++ << ") == " << i->get() << std::endl;
pt::ptime stop( pt::microsec_clock::universal_time() );
std::cout << ( stop - start).total_milliseconds() << " milli seconds" << std::endl;
Modified: sandbox/task/libs/task/examples/reschedule_until.cpp
==============================================================================
--- sandbox/task/libs/task/examples/reschedule_until.cpp (original)
+++ sandbox/task/libs/task/examples/reschedule_until.cpp 2009-05-29 18:42:43 EDT (Fri, 29 May 2009)
@@ -75,7 +75,7 @@
void parallel_fib( long n)
{
fib_task a( 5);
- printf("%d -> %d\n", n, a.execute( n) );
+ printf("fibonacci(%d) == %ld\n", n, a.execute( n) );
}
bool has_bytes( int fd)
Modified: sandbox/task/libs/task/examples/yield.cpp
==============================================================================
--- sandbox/task/libs/task/examples/yield.cpp (original)
+++ sandbox/task/libs/task/examples/yield.cpp 2009-05-29 18:42:43 EDT (Fri, 29 May 2009)
@@ -72,7 +72,7 @@
{
fib_task a( 5);
long result = a.execute( n);
- printf("n == %d, fibonnaci == %d\n", n, result);
+ printf("fibonnaci(%ld) == %d\n", n, result);
}
int main( int argc, char *argv[])
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