comp_tree 0.7.6 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES.rdoc CHANGED
@@ -1,6 +1,12 @@
1
1
 
2
2
  = CompTree ChangeLog
3
3
 
4
+ == Version 1.0.0
5
+
6
+ * better errors and error handling
7
+ * single-threaded compute() now checks exceptions
8
+ * compute(:root, :threads => 3) option deprecated; use compute(:root, 3)
9
+
4
10
  == Version 0.7.6
5
11
 
6
12
  * Driver#define returns created node
data/MANIFEST CHANGED
@@ -3,24 +3,23 @@ MANIFEST
3
3
  README.rdoc
4
4
  Rakefile
5
5
  devel/jumpstart.rb
6
- devel/jumpstart/lazy_attribute.rb
7
- devel/jumpstart/ruby.rb
8
- devel/jumpstart/simple_installer.rb
9
6
  install.rb
10
7
  lib/comp_tree.rb
11
8
  lib/comp_tree/algorithm.rb
9
+ lib/comp_tree/comp_tree.rb
12
10
  lib/comp_tree/driver.rb
13
11
  lib/comp_tree/error.rb
14
12
  lib/comp_tree/node.rb
15
- lib/comp_tree/queue.rb
16
- lib/comp_tree/queue_new.rb
17
- lib/comp_tree/queue_old.rb
18
- test/common.rb
19
- test/test_basic.rb
20
- test/test_circular.rb
21
- test/test_drain.rb
22
- test/test_exception.rb
23
- test/test_flood.rb
24
- test/test_grind.rb
25
- test/test_sequential.rb
26
- test/test_throw.rb
13
+ lib/comp_tree/queue/queue.rb
14
+ lib/comp_tree/queue/queue_18.rb
15
+ lib/comp_tree/queue/queue_19.rb
16
+ test/basic_test.rb
17
+ test/circular_test.rb
18
+ test/comp_tree_test_base.rb
19
+ test/drain_test.rb
20
+ test/exception_test.rb
21
+ test/flood_test.rb
22
+ test/grind_test.rb
23
+ test/readme_test.rb
24
+ test/sequential_test.rb
25
+ test/throw_test.rb
data/README.rdoc CHANGED
@@ -3,8 +3,7 @@
3
3
 
4
4
  == Summary
5
5
 
6
- Automatic parallelism and lazy evaluation via pure functional
7
- programming.
6
+ A simple framework for parallelizing computations.
8
7
 
9
8
  == Synopsis
10
9
 
@@ -33,7 +32,7 @@ programming.
33
32
  }
34
33
 
35
34
  # Compute the area using four parallel threads.
36
- puts driver.compute(:area, :threads => 4)
35
+ puts driver.compute(:area, 4)
37
36
  # => 63
38
37
 
39
38
  # We've done this computation.
@@ -51,14 +50,15 @@ Or for the (non-gem) .tgz package,
51
50
 
52
51
  == Description
53
52
 
54
- CompTree is a framework for parallelizing interrelated computations.
53
+ CompTree is parallel computation tree structure based upon concepts
54
+ from pure functional programming.
55
55
 
56
- The user should have a basic understanding of <em>functional
57
- programming</em> (see for example
58
- http://en.wikipedia.org/wiki/Functional_programming) and the meaning
59
- of <em>side effects</em>.
56
+ The user should have a basic understanding of functional programming
57
+ (see for example http://en.wikipedia.org/wiki/Functional_programming)
58
+ and the meaning of <em>side effects</em>.
60
59
 
61
- Every function you define must explicitly depend on the data it uses.
60
+ Every pure function you define must explicitly depend on the data it
61
+ uses.
62
62
 
63
63
  #
64
64
  # BAD example: depending on state -- offset not listed as a parameter
@@ -68,8 +68,7 @@ Every function you define must explicitly depend on the data it uses.
68
68
  }
69
69
 
70
70
  Unless <em>offset</em> is really a constant, the result of
71
- <tt>driver.compute(:area, :threads => n)</tt> is not well-defined
72
- for _n_ > 1.
71
+ <tt>driver.compute(:area, n)</tt> is not well-defined for _n_ > 1.
73
72
 
74
73
  Just as depending on some changeable state is bad, it is likewise bad
75
74
  to affect a state (to produce a <em>side effect</em>).
@@ -83,12 +82,12 @@ to affect a state (to produce a <em>side effect</em>).
83
82
  }
84
83
 
85
84
  Given a tree where nodes are modifying _accumulator_, the end state of
86
- _accumulator_ is not well-defined. Moreover if _accumulator_ is not
87
- thread-safe, the result will be even worse.
85
+ _accumulator_ is not well-defined, even if _accumulator_ is a
86
+ thread-safe object.
88
87
 
89
88
  Note however it is OK affect a state as long as <em>no other function
90
89
  depends on that state</em>. This is the principle under which
91
- +comp_tree+ parallelizes Rake tasks (http://drake.rubyforge.org).
90
+ CompTree parallelizes Rake tasks (http://drake.rubyforge.org).
92
91
 
93
92
  == Links
94
93
 
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ Jumpstart.new "comp_tree" do |s|
6
6
  s.developer "James M. Lawrence", "quixoticsycophant@gmail.com"
7
7
  s.rubyforge_user = "quix"
8
8
  s.rdoc_files = %w[
9
- lib/comp_tree.rb
9
+ lib/comp_tree/comp_tree.rb
10
10
  lib/comp_tree/driver.rb
11
11
  lib/comp_tree/error.rb
12
12
  ]