BOAST 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/BOAST.gemspec +1 -1
- data/lib/BOAST/Language/Expression.rb +6 -0
- data/lib/BOAST/Language/FuncCall.rb +2 -2
- data/lib/BOAST/Language/Index.rb +1 -1
- data/lib/BOAST/Language/OpenMP.rb +3 -3
- data/lib/BOAST/Language/Variable.rb +7 -11
- data/lib/BOAST/Runtime/NonRegression.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53cb9d1326b52f2ff8125f0e5a3e3c7423f4ccc1
|
4
|
+
data.tar.gz: 4f945e013c4b177f9a86363ad0896e84a7bc5dc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5f93853b1709fbddce9fa34316a05e8314c9f3716ac3adb6da40dc64b36be806af8ce3542ad565e80aeb0edb5205312a80b19af110ee4156ffd337c15f6f9f9
|
7
|
+
data.tar.gz: ead3cd7fcebd87cfd9e088003b3155e44e807be24f4706f92ce7519a7717f8681877db8da6a90c09c0cd60a48a99bdd4c75c83ba2daa0dbe2fe43915cb363012
|
data/BOAST.gemspec
CHANGED
@@ -48,13 +48,13 @@ module BOAST
|
|
48
48
|
def to_s_fortran
|
49
49
|
s = ""
|
50
50
|
s += @prefix if @prefix
|
51
|
-
s += "#{func_name}(#{@args.join(", ")})"
|
51
|
+
s += "#{func_name}(#{@args.collect(&:to_s).join(", ")})"
|
52
52
|
end
|
53
53
|
|
54
54
|
def to_s_c
|
55
55
|
s = ""
|
56
56
|
s += @prefix if @prefix
|
57
|
-
s += "#{func_name}(#{@args.join(", ")})"
|
57
|
+
s += "#{func_name}(#{@args.collect(&:to_s).join(", ")})"
|
58
58
|
end
|
59
59
|
|
60
60
|
private :to_s_fortran, :to_s_c
|
data/lib/BOAST/Language/Index.rb
CHANGED
@@ -32,7 +32,7 @@ EOF
|
|
32
32
|
EOF
|
33
33
|
when :option_list
|
34
34
|
s += <<EOF
|
35
|
-
return " (\#{[c].flatten.join(", ")})"
|
35
|
+
return " (\#{[c].flatten.collect(&:to_s).join(", ")})"
|
36
36
|
EOF
|
37
37
|
when :simple
|
38
38
|
s += <<EOF
|
@@ -40,13 +40,13 @@ EOF
|
|
40
40
|
EOF
|
41
41
|
when :list
|
42
42
|
s += <<EOF
|
43
|
-
return " #{name}(\#{[c].flatten.join(", ")})"
|
43
|
+
return " #{name}(\#{[c].flatten.collect(&:to_s).join(", ")})"
|
44
44
|
EOF
|
45
45
|
when :multilist
|
46
46
|
s += <<EOF
|
47
47
|
s = ""
|
48
48
|
c.each { |id, list|
|
49
|
-
s += " #{name}(\#{id}: \#{[list].flatten.join(", ")})"
|
49
|
+
s += " #{name}(\#{id}: \#{[list].flatten.collect(&:to_s).join(", ")})"
|
50
50
|
}
|
51
51
|
return s
|
52
52
|
EOF
|
@@ -159,12 +159,12 @@ module BOAST
|
|
159
159
|
return copy(name+"."+m.to_s, :vector_length => m.to_s[1..-1].length) if lang == CL
|
160
160
|
return copy("#{name}(#{existing_set.index(required_set[0])+1})", :vector_length => 1) if lang == FORTRAN
|
161
161
|
return copy("#{name}[#{existing_set.index(required_set[0])}]", :vector_length => 1) if lang == C
|
162
|
-
super
|
162
|
+
return super
|
163
163
|
else
|
164
|
-
super
|
164
|
+
return super
|
165
165
|
end
|
166
166
|
else
|
167
|
-
super
|
167
|
+
return super
|
168
168
|
end
|
169
169
|
end
|
170
170
|
|
@@ -393,9 +393,7 @@ module BOAST
|
|
393
393
|
s += " #{@name}"
|
394
394
|
if dimension? and use_vla? and lang != FORTRAN then
|
395
395
|
s += "["
|
396
|
-
s += @dimension.reverse.collect
|
397
|
-
d.to_s
|
398
|
-
}.join("][")
|
396
|
+
s += @dimension.reverse.collect(&:to_s).join("][")
|
399
397
|
s += "]"
|
400
398
|
end
|
401
399
|
return s
|
@@ -501,9 +499,7 @@ module BOAST
|
|
501
499
|
if __vla_array? then
|
502
500
|
s += " #{@name}["
|
503
501
|
s += "__restrict__ " if __restrict?
|
504
|
-
s += @dimension.reverse.collect
|
505
|
-
d.to_s
|
506
|
-
}.join("][")
|
502
|
+
s += @dimension.reverse.collect(&:to_s).join("][")
|
507
503
|
s += "]"
|
508
504
|
else
|
509
505
|
s += " *" if __pointer?(device)
|
@@ -520,7 +516,7 @@ module BOAST
|
|
520
516
|
end
|
521
517
|
if __dimension?(device) then
|
522
518
|
s +="[("
|
523
|
-
s += @dimension.collect
|
519
|
+
s += @dimension.collect(&:to_s).reverse.join(")*(")
|
524
520
|
s +=")]"
|
525
521
|
end
|
526
522
|
end
|
@@ -579,7 +575,7 @@ module BOAST
|
|
579
575
|
end
|
580
576
|
|
581
577
|
def alloc_c( dims, align = get_address_size)
|
582
|
-
ds = dims.collect
|
578
|
+
ds = dims.collect(&:to_s).reverse.join(")*(")
|
583
579
|
if align > (OS.bits/8) then
|
584
580
|
# check alignment is a power of 2
|
585
581
|
raise "Invalid alignment #{align}!" if align & (align - 1) != 0
|
@@ -25,6 +25,9 @@ module BOAST
|
|
25
25
|
next
|
26
26
|
end
|
27
27
|
if param.dimension then
|
28
|
+
outputs[indx].each { |elem|
|
29
|
+
raise "Error! #{elem}" if elem.nan?
|
30
|
+
}
|
28
31
|
diff = (outputs[indx] - ref_outputs[indx]).abs
|
29
32
|
if epsilon then
|
30
33
|
diff.each { |elem|
|
@@ -33,6 +36,7 @@ module BOAST
|
|
33
36
|
end
|
34
37
|
res[param.name] = diff.max
|
35
38
|
else
|
39
|
+
raise "Error: #{param.name} is NaN!" if outputs[indx].nan?
|
36
40
|
raise "Error: #{param.name} different from ref: #{outputs[indx]} != #{ref_outputs[indx]} !" if epsilon and (outputs[indx] - ref_outputs[indx]).abs > epsilon
|
37
41
|
res[param.name] = (outputs[indx] - ref_outputs[indx]).abs
|
38
42
|
end
|
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: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brice Videau
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: narray
|