comp_tree 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/test/grind_test.rb CHANGED
@@ -1,12 +1,10 @@
1
- require File.dirname(__FILE__) + '/comp_tree_test_base'
2
-
3
- class TestGrind < Test::Unit::TestCase
4
- include TestBase
1
+ require File.expand_path(File.dirname(__FILE__)) + '/comp_tree_test_base'
5
2
 
3
+ class GrindTest < CompTreeTest
6
4
  GENERATOR_DATA = {
7
5
  :level_range => 1..5,
8
6
  :children_range => 1..5,
9
- :thread_range => 1..10,
7
+ :thread_range => 0..10,
10
8
  :drain_iterations => 30,
11
9
  }
12
10
 
data/test/readme_test.rb CHANGED
@@ -1,5 +1,5 @@
1
- require File.dirname(__FILE__) + "/comp_tree_test_base"
1
+ require File.expand_path(File.dirname(__FILE__)) + '/comp_tree_test_base'
2
2
 
3
- require "jumpstart"
3
+ require "levitate"
4
4
 
5
- Jumpstart.doc_to_test("README.rdoc", "Synopsis")
5
+ Levitate.doc_to_test("README.rdoc", "Synopsis")
@@ -1,8 +1,8 @@
1
- require File.dirname(__FILE__) + '/comp_tree_test_base'
1
+ require File.expand_path(File.dirname(__FILE__)) + '/comp_tree_test_base'
2
2
 
3
- class TestSequential < Test::Unit::TestCase
3
+ class SequentialTest < CompTreeTest
4
4
  def test_sequential
5
- (1..50).each { |num_threads|
5
+ (0..50).each { |num_threads|
6
6
  [1, 2, 3, 20, 50].each { |num_nodes|
7
7
  CompTree.build { |driver|
8
8
  driver.define(:root) { true }
data/test/throw_test.rb CHANGED
@@ -1,6 +1,6 @@
1
- require File.dirname(__FILE__) + '/comp_tree_test_base'
1
+ require File.expand_path(File.dirname(__FILE__)) + '/comp_tree_test_base'
2
2
 
3
- class TestThrow < Test::Unit::TestCase
3
+ class ThrowTest < CompTreeTest
4
4
  EXPECTED = RUBY_VERSION >= "1.9.0" ? ArgumentError : ThreadError
5
5
 
6
6
  def test_throw
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: comp_tree
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ prerelease:
5
+ version: 1.1.0
5
6
  platform: ruby
6
7
  authors:
7
8
  - James M. Lawrence
@@ -9,7 +10,7 @@ autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
12
 
12
- date: 2009-09-22 00:00:00 -04:00
13
+ date: 2011-03-02 00:00:00 -05:00
13
14
  default_executable:
14
15
  dependencies: []
15
16
 
@@ -22,21 +23,21 @@ extensions: []
22
23
 
23
24
  extra_rdoc_files:
24
25
  - README.rdoc
26
+ - CHANGES.rdoc
25
27
  files:
26
28
  - CHANGES.rdoc
27
29
  - README.rdoc
28
30
  - Rakefile
29
- - devel/jumpstart.rb
30
- - install.rb
31
+ - devel/levitate.rb
31
32
  - lib/comp_tree.rb
32
33
  - lib/comp_tree/algorithm.rb
33
- - lib/comp_tree/comp_tree.rb
34
34
  - lib/comp_tree/driver.rb
35
35
  - lib/comp_tree/error.rb
36
36
  - lib/comp_tree/node.rb
37
37
  - lib/comp_tree/queue/queue.rb
38
38
  - lib/comp_tree/queue/queue_18.rb
39
39
  - lib/comp_tree/queue/queue_19.rb
40
+ - lib/comp_tree/version.rb
40
41
  - test/basic_test.rb
41
42
  - test/circular_test.rb
42
43
  - test/comp_tree_test_base.rb
@@ -49,7 +50,7 @@ files:
49
50
  - test/throw_test.rb
50
51
  - MANIFEST
51
52
  has_rdoc: true
52
- homepage: http://comptree.rubyforge.org
53
+ homepage: http://quix.github.com/comp_tree
53
54
  licenses: []
54
55
 
55
56
  post_install_message:
@@ -59,18 +60,6 @@ rdoc_options:
59
60
  - --title
60
61
  - "comp_tree: A simple framework for automatic parallelism."
61
62
  - --exclude
62
- - CHANGES.rdoc
63
- - --exclude
64
- - README.rdoc
65
- - --exclude
66
- - Rakefile
67
- - --exclude
68
- - devel/jumpstart.rb
69
- - --exclude
70
- - install.rb
71
- - --exclude
72
- - lib/comp_tree.rb
73
- - --exclude
74
63
  - lib/comp_tree/algorithm.rb
75
64
  - --exclude
76
65
  - lib/comp_tree/node.rb
@@ -81,45 +70,27 @@ rdoc_options:
81
70
  - --exclude
82
71
  - lib/comp_tree/queue/queue_19.rb
83
72
  - --exclude
84
- - test/basic_test.rb
85
- - --exclude
86
- - test/circular_test.rb
87
- - --exclude
88
- - test/comp_tree_test_base.rb
89
- - --exclude
90
- - test/drain_test.rb
91
- - --exclude
92
- - test/exception_test.rb
93
- - --exclude
94
- - test/flood_test.rb
95
- - --exclude
96
- - test/grind_test.rb
97
- - --exclude
98
- - test/readme_test.rb
99
- - --exclude
100
- - test/sequential_test.rb
101
- - --exclude
102
- - test/throw_test.rb
73
+ - lib/comp_tree/version.rb
103
74
  - --exclude
104
- - MANIFEST
75
+ - lib/comp_tree.rb
105
76
  require_paths:
106
77
  - lib
107
78
  required_ruby_version: !ruby/object:Gem::Requirement
79
+ none: false
108
80
  requirements:
109
81
  - - ">="
110
82
  - !ruby/object:Gem::Version
111
83
  version: "0"
112
- version:
113
84
  required_rubygems_version: !ruby/object:Gem::Requirement
85
+ none: false
114
86
  requirements:
115
87
  - - ">="
116
88
  - !ruby/object:Gem::Version
117
89
  version: "0"
118
- version:
119
90
  requirements: []
120
91
 
121
- rubyforge_project: comptree
122
- rubygems_version: 1.3.5
92
+ rubyforge_project:
93
+ rubygems_version: 1.5.3
123
94
  signing_key:
124
95
  specification_version: 3
125
96
  summary: A simple framework for automatic parallelism.
data/install.rb DELETED
@@ -1,2 +0,0 @@
1
- load './devel/jumpstart.rb'
2
- Jumpstart::SimpleInstaller.new.run
@@ -1,55 +0,0 @@
1
-
2
- #
3
- # CompTree -- Parallel Computation Tree.
4
- #
5
- # See README.rdoc.
6
- #
7
- module CompTree
8
- VERSION = "1.0.1"
9
-
10
- class << self
11
- #
12
- # :call-seq:
13
- # build { |driver| ... }
14
- #
15
- # Build a new computation tree. A Driver instance is passed to the
16
- # given block.
17
- #
18
- # Example:
19
- # CompTree.build do |driver|
20
- #
21
- # # Define a function named 'area' taking these two arguments.
22
- # driver.define(:area, :width, :height) { |width, height|
23
- # width*height
24
- # }
25
- #
26
- # # Define a function 'width' which takes a 'border' argument.
27
- # driver.define(:width, :border) { |border|
28
- # 7 + border
29
- # }
30
- #
31
- # # Ditto for 'height'.
32
- # driver.define(:height, :border) { |border|
33
- # 5 + border
34
- # }
35
- #
36
- # #
37
- # # Define a constant function 'border'.
38
- # driver.define(:border) {
39
- # 2
40
- # }
41
- #
42
- # # Compute the area using four parallel threads.
43
- # puts driver.compute(:area, 4)
44
- # # => 63
45
- #
46
- # # We've done this computation.
47
- # puts((7 + 2)*(5 + 2))
48
- # # => 63
49
- # end
50
- #
51
- def build(opts = {})
52
- yield Driver.new(opts)
53
- end
54
- end
55
- end