Permalink
Browse files

CUDA: Allow default dimension size in Dim3.

Signed-off-by: Shin Yee <shinyee@speedgocomputing.com>
  • Loading branch information...
1 parent 1e06296 commit 0234eafc6c078fcacd6fde7d938ebe8d9db9ad38 @xman committed Jul 11, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/cuda/runtime/ffi-cuda.rb
@@ -266,7 +266,7 @@ class Dim3 < FFI::Struct
alias :set :[]=
private :init, :get, :set
- def initialize(x, y, z)
+ def initialize(x, y = 1, z = 1)
init
@array = get(:array)
@array[0], @array[1], @array[2] = x, y, z

0 comments on commit 0234eaf

Please sign in to comment.