BOAST 0.9995 → 0.9996

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/BOAST/While.rb CHANGED
@@ -1,8 +1,6 @@
1
1
  module BOAST
2
2
 
3
- class While < BOAST::ControlStructure
4
- include BOAST::Inspectable
5
- extend BOAST::Functor
3
+ class While < ControlStructure
6
4
 
7
5
  attr_reader :condition
8
6
 
@@ -22,10 +20,10 @@ module BOAST
22
20
  }
23
21
 
24
22
  @@strings = {
25
- BOAST::C => @@c_strings,
26
- BOAST::CL => @@c_strings,
27
- BOAST::CUDA => @@c_strings,
28
- BOAST::FORTRAN => @@f_strings
23
+ C => @@c_strings,
24
+ CL => @@c_strings,
25
+ CUDA => @@c_strings,
26
+ FORTRAN => @@f_strings
29
27
  }
30
28
 
31
29
  eval token_string_generator( * %w{while cond} )
@@ -37,28 +35,28 @@ module BOAST
37
35
 
38
36
  def open
39
37
  s=""
40
- s += BOAST::indent
41
- s += self.to_s
42
- BOAST::get_output.puts s
43
- BOAST::increment_indent_level
38
+ s += indent
39
+ s += to_s
40
+ output.puts s
41
+ increment_indent_level
44
42
  return self
45
43
  end
46
44
 
47
- def print(*args)
48
- self.open
45
+ def pr(*args)
46
+ open
49
47
  if @block then
50
48
  @block.call(*args)
51
- self.close
49
+ close
52
50
  end
53
51
  return self
54
52
  end
55
53
 
56
54
  def close
57
- BOAST::decrement_indent_level
55
+ decrement_indent_level
58
56
  s = ""
59
- s += BOAST::indent
57
+ s += indent
60
58
  s += end_string
61
- BOAST::get_output.puts s
59
+ output.puts s
62
60
  return self
63
61
  end
64
62
 
data/lib/BOAST.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require 'BOAST/State.rb'
1
2
  require 'BOAST/Functors.rb'
2
3
  require 'BOAST/Inspectable.rb'
3
4
  require 'BOAST/Transitions.rb'
@@ -19,3 +20,4 @@ require 'BOAST/Pragma.rb'
19
20
  require 'BOAST/CKernel.rb'
20
21
  require 'BOAST/Parens.rb'
21
22
  require 'BOAST/BOAST_OpenCL.rb'
23
+ require 'BOAST/Print.rb'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: BOAST
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.9995'
4
+ version: '0.9996'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-09-03 00:00:00.000000000 Z
12
+ date: 2014-09-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: narray
@@ -90,6 +90,8 @@ files:
90
90
  - lib/BOAST/Inspectable.rb
91
91
  - lib/BOAST/Functors.rb
92
92
  - lib/BOAST/ControlStructure.rb
93
+ - lib/BOAST/Print.rb
94
+ - lib/BOAST/State.rb
93
95
  homepage: https://forge.imag.fr/projects/boast/
94
96
  licenses:
95
97
  - BSD