BOAST 0.997 → 0.998
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 +1 -1
- data/lib/BOAST/CKernel.rb +11 -11
- metadata +2 -2
data/BOAST.gemspec
CHANGED
data/lib/BOAST/CKernel.rb
CHANGED
@@ -294,21 +294,21 @@ def self.run(*args)
|
|
294
294
|
if @procedure.parameters[i].dimension then
|
295
295
|
if @procedure.parameters[i].direction == :in then
|
296
296
|
flags = OpenCL::Mem::Flags::READ_ONLY
|
297
|
-
elsif @procedure.parameters[i].direction == :out
|
297
|
+
elsif @procedure.parameters[i].direction == :out then
|
298
298
|
flags = OpenCL::Mem::Flags::WRITE_ONLY
|
299
299
|
else
|
300
|
-
flags =
|
300
|
+
flags = OpenCL::Mem::Flags::READ_WRITE
|
301
301
|
end
|
302
302
|
if @procedure.parameters[i].texture then
|
303
|
-
params[i] = @context.create_image_2D( OpenCL::ImageFormat::new( OpenCL::ChannelOrder::R, OpenCL::ChannelType::UNORM_INT8 ), args[i].size * args[i].element_size, 1, :flags =>
|
304
|
-
if @procedure.parameters[i].direction == :inout or @procedure.parameters[i].direction == :in then
|
303
|
+
params[i] = @context.create_image_2D( OpenCL::ImageFormat::new( OpenCL::ChannelOrder::R, OpenCL::ChannelType::UNORM_INT8 ), args[i].size * args[i].element_size, 1, :flags => flags )
|
304
|
+
# if @procedure.parameters[i].direction == :inout or @procedure.parameters[i].direction == :in then
|
305
305
|
@queue.enqueue_write_image( params[i], args[i], :blocking => true )
|
306
|
-
end
|
306
|
+
# end
|
307
307
|
else
|
308
|
-
params[i] = @context.create_buffer( args[i].size * args[i].element_size, :flags =>
|
309
|
-
if @procedure.parameters[i].direction == :inout or @procedure.parameters[i].direction == :in then
|
308
|
+
params[i] = @context.create_buffer( args[i].size * args[i].element_size, :flags => flags )
|
309
|
+
# if @procedure.parameters[i].direction == :inout or @procedure.parameters[i].direction == :in then
|
310
310
|
@queue.enqueue_write_buffer( params[i], args[i], :blocking => true )
|
311
|
-
end
|
311
|
+
# end
|
312
312
|
end
|
313
313
|
else
|
314
314
|
if @procedure.parameters[i].type.is_a?(Real) then
|
@@ -532,11 +532,11 @@ EOF
|
|
532
532
|
array_size = n_ary->total * na_sizeof[n_ary->type];
|
533
533
|
cudaMalloc( (void **) &#{param.name}, array_size);
|
534
534
|
EOF
|
535
|
-
if param.direction == :in then
|
535
|
+
# if param.direction == :in then
|
536
536
|
module_file.print <<EOF
|
537
537
|
cudaMemcpy(#{param.name}, (void *) n_ary->ptr, array_size, cudaMemcpyHostToDevice);
|
538
538
|
EOF
|
539
|
-
end
|
539
|
+
# end
|
540
540
|
module_file.print <<EOF
|
541
541
|
} else
|
542
542
|
rb_raise(rb_eArgError, "wrong type of argument %d", #{i});
|
@@ -638,7 +638,7 @@ EOF
|
|
638
638
|
module_file.print <<EOF
|
639
639
|
if ( IsNArray(rb_ptr) ) {
|
640
640
|
EOF
|
641
|
-
if param.direction == :out then
|
641
|
+
if param.direction == :out or param.direction == :inout then
|
642
642
|
module_file.print <<EOF
|
643
643
|
struct NARRAY *n_ary;
|
644
644
|
size_t array_size;
|
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.
|
4
|
+
version: '0.998'
|
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-07-
|
12
|
+
date: 2014-07-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: narray
|