BOAST 1.3.5 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/BOAST.gemspec +1 -1
  3. data/LICENSE +13 -1
  4. data/README.md +62 -13
  5. data/lib/BOAST.rb +3 -1
  6. data/lib/BOAST/Language/ARMCPUID_by_name.rb +3752 -0
  7. data/lib/BOAST/Language/Algorithm.rb +4 -24
  8. data/lib/BOAST/Language/Architectures.rb +5 -0
  9. data/lib/BOAST/Language/Arithmetic.rb +38 -5
  10. data/lib/BOAST/Language/BOAST_OpenCL.rb +7 -8
  11. data/lib/BOAST/Language/Case.rb +10 -3
  12. data/lib/BOAST/Language/Config.rb +36 -12
  13. data/lib/BOAST/Language/ControlStructure.rb +7 -3
  14. data/lib/BOAST/Language/DataTypes.rb +6 -0
  15. data/lib/BOAST/Language/Expression.rb +26 -2
  16. data/lib/BOAST/Language/For.rb +59 -30
  17. data/lib/BOAST/Language/FuncCall.rb +9 -5
  18. data/lib/BOAST/Language/Functors.rb +1 -1
  19. data/lib/BOAST/Language/HighLevelOperators.rb +172 -0
  20. data/lib/BOAST/Language/If.rb +25 -9
  21. data/lib/BOAST/Language/Index.rb +5 -5
  22. data/lib/BOAST/Language/Intrinsics.rb +40 -27
  23. data/lib/BOAST/Language/OpenMP.rb +1 -0
  24. data/lib/BOAST/Language/Operators.rb +221 -34
  25. data/lib/BOAST/Language/Parens.rb +3 -2
  26. data/lib/BOAST/Language/Procedure.rb +18 -5
  27. data/lib/BOAST/Language/Slice.rb +176 -44
  28. data/lib/BOAST/Language/Variable.rb +99 -56
  29. data/lib/BOAST/Language/While.rb +18 -3
  30. data/lib/BOAST/Language/{CPUID_by_name.rb → X86CPUID_by_name.rb} +0 -0
  31. data/lib/BOAST/Optimization/Optimization.rb +2 -0
  32. data/lib/BOAST/Runtime/AffinityProbe.rb +7 -3
  33. data/lib/BOAST/Runtime/CKernel.rb +3 -0
  34. data/lib/BOAST/Runtime/CRuntime.rb +4 -0
  35. data/lib/BOAST/Runtime/CompiledRuntime.rb +404 -77
  36. data/lib/BOAST/Runtime/Compilers.rb +44 -18
  37. data/lib/BOAST/Runtime/Config.rb +9 -0
  38. data/lib/BOAST/Runtime/EnergyProbe.rb +19 -3
  39. data/lib/BOAST/Runtime/FFIRuntime.rb +23 -0
  40. data/lib/BOAST/Runtime/FORTRANRuntime.rb +1 -1
  41. data/lib/BOAST/Runtime/MAQAO.rb +29 -0
  42. data/lib/BOAST/Runtime/NonRegression.rb +64 -3
  43. data/lib/BOAST/Runtime/OpenCLRuntime.rb +16 -6
  44. data/lib/BOAST/Runtime/Probe.rb +21 -1
  45. metadata +5 -3
@@ -8,6 +8,14 @@ module BOAST
8
8
 
9
9
  module_function
10
10
 
11
+ def ldflags
12
+ if OS.mac? then
13
+ ""
14
+ else
15
+ "-lrt"
16
+ end
17
+ end
18
+
11
19
  def header
12
20
  if OS.mac? then
13
21
  get_output.print <<EOF
@@ -60,9 +68,18 @@ EOF
60
68
  else
61
69
  get_output.print " #{RESULT} = (int64_t)(_boast_stop.tv_sec - _boast_start.tv_sec) * 1000000000ll + _boast_stop.tv_nsec - _boast_start.tv_nsec;\n"
62
70
  end
71
+ end
72
+
73
+ def store
63
74
  get_output.print " rb_hash_aset(_boast_stats,ID2SYM(rb_intern(\"duration\")),rb_float_new((double)#{RESULT}*(double)1e-9));\n"
64
75
  end
65
76
 
77
+ def to_yaml
78
+ get_output.print <<EOF
79
+ printf(":duration: %lf\\n", (double)#{RESULT}*(double)1e-9);
80
+ EOF
81
+ end
82
+
66
83
  end
67
84
 
68
85
  # @private
@@ -107,7 +124,7 @@ EOF
107
124
  rb_funcall(_boast_event_set, rb_intern("start"), 0);
108
125
  }
109
126
  EOF
110
- end
127
+ end
111
128
 
112
129
  def stop
113
130
  get_output.print <<EOF
@@ -118,6 +135,9 @@ EOF
118
135
  end
119
136
 
120
137
  def compute
138
+ end
139
+
140
+ def store
121
141
  get_output.print <<EOF
122
142
  if( _boast_papi_results != Qnil) {
123
143
  VALUE _boast_papi_stats = Qnil;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: BOAST
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.5
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brice Videau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-19 00:00:00.000000000 Z
11
+ date: 2017-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: narray
@@ -195,12 +195,12 @@ files:
195
195
  - LICENSE
196
196
  - README.md
197
197
  - lib/BOAST.rb
198
+ - lib/BOAST/Language/ARMCPUID_by_name.rb
198
199
  - lib/BOAST/Language/Algorithm.rb
199
200
  - lib/BOAST/Language/Annotation.rb
200
201
  - lib/BOAST/Language/Architectures.rb
201
202
  - lib/BOAST/Language/Arithmetic.rb
202
203
  - lib/BOAST/Language/BOAST_OpenCL.rb
203
- - lib/BOAST/Language/CPUID_by_name.rb
204
204
  - lib/BOAST/Language/Case.rb
205
205
  - lib/BOAST/Language/CodeBlock.rb
206
206
  - lib/BOAST/Language/Comment.rb
@@ -212,6 +212,7 @@ files:
212
212
  - lib/BOAST/Language/For.rb
213
213
  - lib/BOAST/Language/FuncCall.rb
214
214
  - lib/BOAST/Language/Functors.rb
215
+ - lib/BOAST/Language/HighLevelOperators.rb
215
216
  - lib/BOAST/Language/If.rb
216
217
  - lib/BOAST/Language/Index.rb
217
218
  - lib/BOAST/Language/Inspectable.rb
@@ -227,6 +228,7 @@ files:
227
228
  - lib/BOAST/Language/Transitions.rb
228
229
  - lib/BOAST/Language/Variable.rb
229
230
  - lib/BOAST/Language/While.rb
231
+ - lib/BOAST/Language/X86CPUID_by_name.rb
230
232
  - lib/BOAST/Optimization/Optimization.rb
231
233
  - lib/BOAST/Runtime/AffinityProbe.rb
232
234
  - lib/BOAST/Runtime/CKernel.rb