BOAST 0.99991 → 0.99992

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/BOAST.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'BOAST'
3
- s.version = "0.99991"
3
+ s.version = "0.99992"
4
4
  s.author = "Brice Videau"
5
5
  s.email = "brice.videau@imag.fr"
6
6
  s.homepage = "https://forge.imag.fr/projects/boast/"
@@ -301,6 +301,30 @@ module BOAST
301
301
  else
302
302
  return basic_usage(arg1, arg2)
303
303
  end
304
+ elsif lang == CL then
305
+ if arg1.class == Variable and arg1.type.vector_length > 1 then
306
+ if arg2.class == Variable and arg2.type.vector_length == arg1.type.vector_length then
307
+ return "#{arg1} = convert_#{arg1.type.decl}(#{arg2})"
308
+ else
309
+ a2 = "#{arg2}"
310
+ if a2[0] != "*" then
311
+ a2 = "&" + a2
312
+ else
313
+ a2 = a2[1..-1]
314
+ end
315
+ return "#{arg1} = vload#{arg1.type.vector_length}(0, #{a2})"
316
+ end
317
+ elsif arg2.class == Variable and arg2.type.vector_length > 1 then
318
+ a1 = "#{arg1}"
319
+ if a1[0] != "*" then
320
+ a1 = "&" + a1
321
+ else
322
+ a1 = a1[1..-1]
323
+ end
324
+ return "vstore#{arg2.type.vector_length}(#{arg2}, 0, #{a1})"
325
+ else
326
+ return basic_usage(arg1, arg2)
327
+ end
304
328
  else
305
329
  return basic_usage(arg1, arg2)
306
330
  end
@@ -332,7 +332,7 @@ module BOAST
332
332
  s += ", dimension("
333
333
  dim = @dimension[0].to_s
334
334
  if dim then
335
- s += dim
335
+ s += dim.to_s
336
336
  @dimension[1..-1].each { |d|
337
337
  s += ", #{d}"
338
338
  }
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.99991'
4
+ version: '0.99992'
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-23 00:00:00.000000000 Z
12
+ date: 2014-09-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: narray