opencl_ruby_ffi 1.0.1 → 1.0.2
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.
- checksums.yaml +4 -4
 - data/lib/opencl_ruby_ffi/Buffer.rb +4 -1
 - data/lib/opencl_ruby_ffi/CommandQueue.rb +20 -20
 - data/lib/opencl_ruby_ffi/Context.rb +27 -18
 - data/lib/opencl_ruby_ffi/Device.rb +2 -2
 - data/lib/opencl_ruby_ffi/Event.rb +1 -1
 - data/lib/opencl_ruby_ffi/Image.rb +30 -9
 - data/lib/opencl_ruby_ffi/Kernel.rb +3 -3
 - data/lib/opencl_ruby_ffi/Mem.rb +8 -4
 - data/lib/opencl_ruby_ffi/SVM.rb +1 -1
 - data/opencl_ruby_ffi.gemspec +1 -1
 - metadata +3 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: b70a1f7693cf95d7be13695e3462dccfa46af4d3
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 4a191813b7b7638b33931afaa74aeccd9246ba65
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: ff3e4bf3b550df5a645eb3a738f3510c1e9bf5551bd8619210bc489d0ac9bbce82ef9637007b71e94f41320034f8232b18b39a866da251d2692fcebf310bc9bc
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 86db94d389802daf7dd038b0a08c2e360671a00b219fb8149c2ad9a448b4246c3388ec397bcfcca0196a7ae908ac27f24588212171627cf0d5a8660289c6ef90
         
     | 
| 
         @@ -53,13 +53,16 @@ module OpenCL 
     | 
|
| 
       53 
53 
     | 
    
         
             
              # ==== Options
         
     | 
| 
       54 
54 
     | 
    
         
             
              #
         
     | 
| 
       55 
55 
     | 
    
         
             
              # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Image
         
     | 
| 
       56 
     | 
    
         
            -
              def self. 
     | 
| 
      
 56 
     | 
    
         
            +
              def self.create_from_gl_buffer( context, bufobj, options = {} )
         
     | 
| 
       57 
57 
     | 
    
         
             
                flags = get_flags( options )
         
     | 
| 
       58 
58 
     | 
    
         
             
                error = FFI::MemoryPointer::new( :cl_int )
         
     | 
| 
       59 
59 
     | 
    
         
             
                buff = clCreateFromGLBuffer( context, flags, bufobj, error )
         
     | 
| 
       60 
60 
     | 
    
         
             
                error_check(error.read_cl_int)
         
     | 
| 
       61 
61 
     | 
    
         
             
                return Buffer::new( buff, false )
         
     | 
| 
       62 
62 
     | 
    
         
             
              end
         
     | 
| 
      
 63 
     | 
    
         
            +
              class << self
         
     | 
| 
      
 64 
     | 
    
         
            +
                alias :create_from_GL_buffer :create_from_gl_buffer
         
     | 
| 
      
 65 
     | 
    
         
            +
              end
         
     | 
| 
       63 
66 
     | 
    
         | 
| 
       64 
67 
     | 
    
         
             
              # Maps the cl_mem OpenCL object of type CL_MEM_OBJECT_BUFFER
         
     | 
| 
       65 
68 
     | 
    
         
             
              class Buffer < Mem
         
     | 
| 
         @@ -549,7 +549,7 @@ module OpenCL 
     | 
|
| 
       549 
549 
     | 
    
         
             
              # ==== Returns
         
     | 
| 
       550 
550 
     | 
    
         
             
              #
         
     | 
| 
       551 
551 
     | 
    
         
             
              # the Event associated with the command
         
     | 
| 
       552 
     | 
    
         
            -
              def self. 
     | 
| 
      
 552 
     | 
    
         
            +
              def self.enqueue_acquire_gl_objects( command_queue, mem_objects, options = {} )
         
     | 
| 
       553 
553 
     | 
    
         
             
                num_objs = [mem_objects].flatten.length
         
     | 
| 
       554 
554 
     | 
    
         
             
                objs = nil
         
     | 
| 
       555 
555 
     | 
    
         
             
                if num_objs > 0 then
         
     | 
| 
         @@ -565,7 +565,7 @@ module OpenCL 
     | 
|
| 
       565 
565 
     | 
    
         
             
                return Event::new(event.read_pointer, false)
         
     | 
| 
       566 
566 
     | 
    
         
             
              end
         
     | 
| 
       567 
567 
     | 
    
         
             
              class << self
         
     | 
| 
       568 
     | 
    
         
            -
                alias : 
     | 
| 
      
 568 
     | 
    
         
            +
                alias :enqueue_acquire_GL_objects :enqueue_acquire_gl_objects
         
     | 
| 
       569 
569 
     | 
    
         
             
              end
         
     | 
| 
       570 
570 
     | 
    
         | 
| 
       571 
571 
     | 
    
         
             
              # Release OpenCL Mem objects that have been created from OpenGL objects and previously acquired
         
     | 
| 
         @@ -583,7 +583,7 @@ module OpenCL 
     | 
|
| 
       583 
583 
     | 
    
         
             
              # ==== Returns
         
     | 
| 
       584 
584 
     | 
    
         
             
              #
         
     | 
| 
       585 
585 
     | 
    
         
             
              # the Event associated with the command
         
     | 
| 
       586 
     | 
    
         
            -
              def self. 
     | 
| 
      
 586 
     | 
    
         
            +
              def self.enqueue_release_gl_objects( command_queue, mem_objects, options = {} )
         
     | 
| 
       587 
587 
     | 
    
         
             
                num_objs = [mem_objects].flatten.length
         
     | 
| 
       588 
588 
     | 
    
         
             
                objs = nil
         
     | 
| 
       589 
589 
     | 
    
         
             
                if num_objs > 0 then
         
     | 
| 
         @@ -599,7 +599,7 @@ module OpenCL 
     | 
|
| 
       599 
599 
     | 
    
         
             
                return Event::new(event.read_pointer, false)
         
     | 
| 
       600 
600 
     | 
    
         
             
              end
         
     | 
| 
       601 
601 
     | 
    
         
             
              class << self
         
     | 
| 
       602 
     | 
    
         
            -
                alias : 
     | 
| 
      
 602 
     | 
    
         
            +
                alias :enqueue_release_GL_objects :enqueue_release_gl_objects
         
     | 
| 
       603 
603 
     | 
    
         
             
              end
         
     | 
| 
       604 
604 
     | 
    
         | 
| 
       605 
605 
     | 
    
         
             
              # Enqueues a command to fill a Buffer with the given pattern
         
     | 
| 
         @@ -913,11 +913,11 @@ module OpenCL 
     | 
|
| 
       913 
913 
     | 
    
         
             
                else
         
     | 
| 
       914 
914 
     | 
    
         
             
                  opts = options.dup
         
     | 
| 
       915 
915 
     | 
    
         
             
                  opts[:local_work_size] = [1]
         
     | 
| 
       916 
     | 
    
         
            -
                  return  
     | 
| 
      
 916 
     | 
    
         
            +
                  return enqueue_ndrange_kernel( command_queue, kernel, [1], opts )
         
     | 
| 
       917 
917 
     | 
    
         
             
                end
         
     | 
| 
       918 
918 
     | 
    
         
             
              end
         
     | 
| 
       919 
919 
     | 
    
         | 
| 
       920 
     | 
    
         
            -
              # Enqueues a kernel as a  
     | 
| 
      
 920 
     | 
    
         
            +
              # Enqueues a kernel as a ndrange
         
     | 
| 
       921 
921 
     | 
    
         
             
              #
         
     | 
| 
       922 
922 
     | 
    
         
             
              # ==== Attributes
         
     | 
| 
       923 
923 
     | 
    
         
             
              # 
         
     | 
| 
         @@ -935,7 +935,7 @@ module OpenCL 
     | 
|
| 
       935 
935 
     | 
    
         
             
              # ==== Returns
         
     | 
| 
       936 
936 
     | 
    
         
             
              #
         
     | 
| 
       937 
937 
     | 
    
         
             
              # the Event associated with the command
         
     | 
| 
       938 
     | 
    
         
            -
              def self. 
     | 
| 
      
 938 
     | 
    
         
            +
              def self.enqueue_ndrange_kernel( command_queue, kernel, global_work_size, options={} )
         
     | 
| 
       939 
939 
     | 
    
         
             
                gws = FFI::MemoryPointer::new( :size_t, global_work_size.length )
         
     | 
| 
       940 
940 
     | 
    
         
             
                global_work_size.each_with_index { |g, i|
         
     | 
| 
       941 
941 
     | 
    
         
             
                  gws[i].write_size_t(g)
         
     | 
| 
         @@ -961,7 +961,7 @@ module OpenCL 
     | 
|
| 
       961 
961 
     | 
    
         
             
                return Event::new(event.read_pointer, false)
         
     | 
| 
       962 
962 
     | 
    
         
             
              end
         
     | 
| 
       963 
963 
     | 
    
         
             
              class << self
         
     | 
| 
       964 
     | 
    
         
            -
                alias : 
     | 
| 
      
 964 
     | 
    
         
            +
                alias :enqueue_NDrange_kernel :enqueue_ndrange_kernel
         
     | 
| 
       965 
965 
     | 
    
         
             
              end
         
     | 
| 
       966 
966 
     | 
    
         | 
| 
       967 
967 
     | 
    
         
             
              # Enqueues a barrier on a list of envents
         
     | 
| 
         @@ -1104,7 +1104,7 @@ module OpenCL 
     | 
|
| 
       1104 
1104 
     | 
    
         
             
                  return OpenCL.enqueue_task( self, kernel, options )
         
     | 
| 
       1105 
1105 
     | 
    
         
             
                end
         
     | 
| 
       1106 
1106 
     | 
    
         | 
| 
       1107 
     | 
    
         
            -
                # Enqueues a kernel as a  
     | 
| 
      
 1107 
     | 
    
         
            +
                # Enqueues a kernel as a ndrange using the CommandQueue
         
     | 
| 
       1108 
1108 
     | 
    
         
             
                #
         
     | 
| 
       1109 
1109 
     | 
    
         
             
                # ==== Attributes
         
     | 
| 
       1110 
1110 
     | 
    
         
             
                # 
         
     | 
| 
         @@ -1121,10 +1121,10 @@ module OpenCL 
     | 
|
| 
       1121 
1121 
     | 
    
         
             
                # ==== Returns
         
     | 
| 
       1122 
1122 
     | 
    
         
             
                #
         
     | 
| 
       1123 
1123 
     | 
    
         
             
                # the Event associated with the command
         
     | 
| 
       1124 
     | 
    
         
            -
                def  
     | 
| 
       1125 
     | 
    
         
            -
                  return OpenCL. 
     | 
| 
      
 1124 
     | 
    
         
            +
                def enqueue_ndrange_kernel( kernel, global_work_size, options = {} )
         
     | 
| 
      
 1125 
     | 
    
         
            +
                  return OpenCL.enqueue_ndrange_kernel( self, kernel, global_work_size, options )
         
     | 
| 
       1126 
1126 
     | 
    
         
             
                end
         
     | 
| 
       1127 
     | 
    
         
            -
                alias : 
     | 
| 
      
 1127 
     | 
    
         
            +
                alias :enqueue_NDrange_kernel :enqueue_ndrange_kernel
         
     | 
| 
       1128 
1128 
     | 
    
         | 
| 
       1129 
1129 
     | 
    
         
             
                # Enqueues a command to write to a Buffer object from host memory using the CommandQueue
         
     | 
| 
       1130 
1130 
     | 
    
         
             
                #
         
     | 
| 
         @@ -1488,10 +1488,10 @@ module OpenCL 
     | 
|
| 
       1488 
1488 
     | 
    
         
             
                # ==== Returns
         
     | 
| 
       1489 
1489 
     | 
    
         
             
                #
         
     | 
| 
       1490 
1490 
     | 
    
         
             
                # the Event associated with the command
         
     | 
| 
       1491 
     | 
    
         
            -
                def  
     | 
| 
       1492 
     | 
    
         
            -
                  return OpenCL. 
     | 
| 
      
 1491 
     | 
    
         
            +
                def enqueue_acquire_gl_objects( mem_objects, options = {} )
         
     | 
| 
      
 1492 
     | 
    
         
            +
                  return OpenCL.enqueue_acquire_gl_objects( self, mem_objects, options )
         
     | 
| 
       1493 
1493 
     | 
    
         
             
                end
         
     | 
| 
       1494 
     | 
    
         
            -
                alias : 
     | 
| 
      
 1494 
     | 
    
         
            +
                alias :enqueue_acquire_GL_objects :enqueue_acquire_gl_objects
         
     | 
| 
       1495 
1495 
     | 
    
         | 
| 
       1496 
1496 
     | 
    
         
             
                # Release OpenCL Mem objects that have been created from OpenGL objects and previously acquired using the CommandQueue
         
     | 
| 
       1497 
1497 
     | 
    
         
             
                #
         
     | 
| 
         @@ -1507,10 +1507,10 @@ module OpenCL 
     | 
|
| 
       1507 
1507 
     | 
    
         
             
                # ==== Returns
         
     | 
| 
       1508 
1508 
     | 
    
         
             
                #
         
     | 
| 
       1509 
1509 
     | 
    
         
             
                # the Event associated with the command
         
     | 
| 
       1510 
     | 
    
         
            -
                def  
     | 
| 
       1511 
     | 
    
         
            -
                  return OpenCL. 
     | 
| 
      
 1510 
     | 
    
         
            +
                def enqueue_release_gl_objects( mem_objects, options = {} )
         
     | 
| 
      
 1511 
     | 
    
         
            +
                  return OpenCL.enqueue_release_gl_objects( self, mem_objects, options )
         
     | 
| 
       1512 
1512 
     | 
    
         
             
                end
         
     | 
| 
       1513 
     | 
    
         
            -
                alias : 
     | 
| 
      
 1513 
     | 
    
         
            +
                alias :enqueue_release_GL_objects :enqueue_release_gl_objects
         
     | 
| 
       1514 
1514 
     | 
    
         | 
| 
       1515 
1515 
     | 
    
         
             
                # Enqueues a command to map a Buffer into host memory using the CommandQueue
         
     | 
| 
       1516 
1516 
     | 
    
         
             
                #
         
     | 
| 
         @@ -1690,8 +1690,8 @@ module OpenCL 
     | 
|
| 
       1690 
1690 
     | 
    
         
             
                # ==== Returns
         
     | 
| 
       1691 
1691 
     | 
    
         
             
                #
         
     | 
| 
       1692 
1692 
     | 
    
         
             
                # the Event associated with the command
         
     | 
| 
       1693 
     | 
    
         
            -
                def  
     | 
| 
       1694 
     | 
    
         
            -
                  return OpenCL. 
     | 
| 
      
 1693 
     | 
    
         
            +
                def enqueue_svm_memfill(command_queue, svm_ptr, pattern, size, options = {})
         
     | 
| 
      
 1694 
     | 
    
         
            +
                  return OpenCL.enqueue_svm_memfill(self, svm_ptr, pattern, size, options)
         
     | 
| 
       1695 
1695 
     | 
    
         
             
                end
         
     | 
| 
       1696 
1696 
     | 
    
         | 
| 
       1697 
1697 
     | 
    
         
             
                # Enqueues a command to map an Image into host memory using the CommandQueue
         
     | 
| 
         @@ -162,9 +162,10 @@ module OpenCL 
     | 
|
| 
       162 
162 
     | 
    
         
             
                # ==== Options
         
     | 
| 
       163 
163 
     | 
    
         
             
                #
         
     | 
| 
       164 
164 
     | 
    
         
             
                # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Image
         
     | 
| 
       165 
     | 
    
         
            -
                def  
     | 
| 
       166 
     | 
    
         
            -
                  return OpenCL. 
     | 
| 
      
 165 
     | 
    
         
            +
                def create_from_gl_buffer( bufobj, options = {} )
         
     | 
| 
      
 166 
     | 
    
         
            +
                  return OpenCL.create_from_gl_buffer( self, bufobj, options )
         
     | 
| 
       167 
167 
     | 
    
         
             
                end
         
     | 
| 
      
 168 
     | 
    
         
            +
                alias :create_from_GL_buffer :create_from_gl_buffer
         
     | 
| 
       168 
169 
     | 
    
         | 
| 
       169 
170 
     | 
    
         
             
                # Creates an Image in the Context from an OpenGL render buffer
         
     | 
| 
       170 
171 
     | 
    
         
             
                #
         
     | 
| 
         @@ -176,9 +177,10 @@ module OpenCL 
     | 
|
| 
       176 
177 
     | 
    
         
             
                # ==== Options
         
     | 
| 
       177 
178 
     | 
    
         
             
                #
         
     | 
| 
       178 
179 
     | 
    
         
             
                # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Image
         
     | 
| 
       179 
     | 
    
         
            -
                def  
     | 
| 
       180 
     | 
    
         
            -
                  return OpenCL. 
     | 
| 
      
 180 
     | 
    
         
            +
                def create_from_gl_render_buffer( renderbuffer, options = {} )
         
     | 
| 
      
 181 
     | 
    
         
            +
                  return OpenCL.create_from_gl_render_buffer( self, renderbuffer, options )
         
     | 
| 
       181 
182 
     | 
    
         
             
                end
         
     | 
| 
      
 183 
     | 
    
         
            +
                alias :create_from_GL_render_buffer :create_from_gl_render_buffer
         
     | 
| 
       182 
184 
     | 
    
         | 
| 
       183 
185 
     | 
    
         
             
                # Creates an Image in the Context from an OpenGL texture
         
     | 
| 
       184 
186 
     | 
    
         
             
                #
         
     | 
| 
         @@ -192,9 +194,10 @@ module OpenCL 
     | 
|
| 
       192 
194 
     | 
    
         
             
                #
         
     | 
| 
       193 
195 
     | 
    
         
             
                # * +:miplevel+ - a :GLint specifying the mipmap level to be used (default 0)
         
     | 
| 
       194 
196 
     | 
    
         
             
                # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Image
         
     | 
| 
       195 
     | 
    
         
            -
                def  
     | 
| 
       196 
     | 
    
         
            -
                  return OpenCL. 
     | 
| 
      
 197 
     | 
    
         
            +
                def create_from_gl_texture( texture_target, texture, options = {} )
         
     | 
| 
      
 198 
     | 
    
         
            +
                  return OpenCL.create_from_gl_texture( self, texture_target, texture, options )
         
     | 
| 
       197 
199 
     | 
    
         
             
                end
         
     | 
| 
      
 200 
     | 
    
         
            +
                alias :create_from_GL_texture :create_from_gl_texture
         
     | 
| 
       198 
201 
     | 
    
         | 
| 
       199 
202 
     | 
    
         
             
                # Creates an Image in the Context from an OpenGL 2D texture
         
     | 
| 
       200 
203 
     | 
    
         
             
                #
         
     | 
| 
         @@ -208,9 +211,10 @@ module OpenCL 
     | 
|
| 
       208 
211 
     | 
    
         
             
                #
         
     | 
| 
       209 
212 
     | 
    
         
             
                # * +:miplevel+ - a :GLint specifying the mipmap level to be used (default 0)
         
     | 
| 
       210 
213 
     | 
    
         
             
                # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Image
         
     | 
| 
       211 
     | 
    
         
            -
                def  
     | 
| 
       212 
     | 
    
         
            -
                  return OpenCL. 
     | 
| 
      
 214 
     | 
    
         
            +
                def create_from_gl_texture_2d( texture_target, texture, options = {} )
         
     | 
| 
      
 215 
     | 
    
         
            +
                  return OpenCL.create_from_gl_texture_2d( self, texture_target, texture, options )
         
     | 
| 
       213 
216 
     | 
    
         
             
                end
         
     | 
| 
      
 217 
     | 
    
         
            +
                alias :create_from_GL_texture_2D :create_from_gl_texture_2d
         
     | 
| 
       214 
218 
     | 
    
         | 
| 
       215 
219 
     | 
    
         
             
                # Creates an Image in the Context from an OpenGL 3D texture
         
     | 
| 
       216 
220 
     | 
    
         
             
                #
         
     | 
| 
         @@ -224,9 +228,10 @@ module OpenCL 
     | 
|
| 
       224 
228 
     | 
    
         
             
                #
         
     | 
| 
       225 
229 
     | 
    
         
             
                # * +:miplevel+ - a :GLint specifying the mipmap level to be used (default 0)
         
     | 
| 
       226 
230 
     | 
    
         
             
                # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Image
         
     | 
| 
       227 
     | 
    
         
            -
                def  
     | 
| 
       228 
     | 
    
         
            -
                  return OpenCL. 
     | 
| 
      
 231 
     | 
    
         
            +
                def create_from_gl_texture_3d( texture_target, texture, options = {} )
         
     | 
| 
      
 232 
     | 
    
         
            +
                  return OpenCL.create_from_gl_texture_3d( self, texture_target, texture, options )
         
     | 
| 
       229 
233 
     | 
    
         
             
                end
         
     | 
| 
      
 234 
     | 
    
         
            +
                alias :create_from_GL_texture_3D :create_from_gl_texture_3d
         
     | 
| 
       230 
235 
     | 
    
         | 
| 
       231 
236 
     | 
    
         
             
                # Creates an Image in the Context
         
     | 
| 
       232 
237 
     | 
    
         
             
                #
         
     | 
| 
         @@ -254,9 +259,10 @@ module OpenCL 
     | 
|
| 
       254 
259 
     | 
    
         
             
                # 
         
     | 
| 
       255 
260 
     | 
    
         
             
                # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Buffer
         
     | 
| 
       256 
261 
     | 
    
         
             
                # * +:host_ptr+ - if provided, the Pointer (or convertible to Pointer using to_ptr) to the memory area to use
         
     | 
| 
       257 
     | 
    
         
            -
                def  
     | 
| 
       258 
     | 
    
         
            -
                  return OpenCL. 
     | 
| 
      
 262 
     | 
    
         
            +
                def create_image_1d( format, width, options = {} )
         
     | 
| 
      
 263 
     | 
    
         
            +
                  return OpenCL.create_image_1d( self, format, width, options )
         
     | 
| 
       259 
264 
     | 
    
         
             
                end
         
     | 
| 
      
 265 
     | 
    
         
            +
                alias :create_image_1D :create_image_1d
         
     | 
| 
       260 
266 
     | 
    
         | 
| 
       261 
267 
     | 
    
         
             
                # Creates a 2D Image in the Context
         
     | 
| 
       262 
268 
     | 
    
         
             
                #
         
     | 
| 
         @@ -270,9 +276,10 @@ module OpenCL 
     | 
|
| 
       270 
276 
     | 
    
         
             
                # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Buffer
         
     | 
| 
       271 
277 
     | 
    
         
             
                # * +:host_ptr+ - if provided, the Pointer (or convertible to Pointer using to_ptr) to the memory area to use
         
     | 
| 
       272 
278 
     | 
    
         
             
                # * +:row_pitch+ - if provided the row_pitch of data in host_ptr
         
     | 
| 
       273 
     | 
    
         
            -
                def  
     | 
| 
       274 
     | 
    
         
            -
                  return OpenCL. 
     | 
| 
      
 279 
     | 
    
         
            +
                def create_image_2d( format, width, height, options = {} )
         
     | 
| 
      
 280 
     | 
    
         
            +
                  return OpenCL.create_image_2d( self, format, width, height, options )
         
     | 
| 
       275 
281 
     | 
    
         
             
                end
         
     | 
| 
      
 282 
     | 
    
         
            +
                alias :create_image_2D :create_image_2d
         
     | 
| 
       276 
283 
     | 
    
         | 
| 
       277 
284 
     | 
    
         
             
                # Creates a 3D Image in the Context
         
     | 
| 
       278 
285 
     | 
    
         
             
                #
         
     | 
| 
         @@ -287,18 +294,20 @@ module OpenCL 
     | 
|
| 
       287 
294 
     | 
    
         
             
                # * +:host_ptr+ - if provided, the Pointer (or convertible to Pointer using to_ptr) to the memory area to use
         
     | 
| 
       288 
295 
     | 
    
         
             
                # * +:row_pitch+ - if provided the row_pitch of data in host_ptr
         
     | 
| 
       289 
296 
     | 
    
         
             
                # * +:slice_pitch+ - if provided the slice_pitch of data in host_ptr
         
     | 
| 
       290 
     | 
    
         
            -
                def  
     | 
| 
       291 
     | 
    
         
            -
                  return OpenCL. 
     | 
| 
      
 297 
     | 
    
         
            +
                def create_image_3d( format, width, height, depth, options = {} )
         
     | 
| 
      
 298 
     | 
    
         
            +
                  return OpenCL.create_image_3d( self, format, width, height, depth, options )
         
     | 
| 
       292 
299 
     | 
    
         
             
                end
         
     | 
| 
      
 300 
     | 
    
         
            +
                alias :create_image_3D :create_image_3d
         
     | 
| 
       293 
301 
     | 
    
         | 
| 
       294 
302 
     | 
    
         
             
            #    # Creates an Event in the Context from a GL sync
         
     | 
| 
       295 
303 
     | 
    
         
             
            #    #
         
     | 
| 
       296 
304 
     | 
    
         
             
            #    # ==== Attributes
         
     | 
| 
       297 
305 
     | 
    
         
             
            #    #
         
     | 
| 
       298 
306 
     | 
    
         
             
            #    # * +sync+ - a :GLsync representing the name of the sync object
         
     | 
| 
       299 
     | 
    
         
            -
            #    def  
     | 
| 
       300 
     | 
    
         
            -
            #      return OpenCL. 
     | 
| 
      
 307 
     | 
    
         
            +
            #    def create_event_from_gl_sync_khr( sync )
         
     | 
| 
      
 308 
     | 
    
         
            +
            #      return OpenCL.create_event_from_gl_sync_khr( self, sync )
         
     | 
| 
       301 
309 
     | 
    
         
             
            #    end
         
     | 
| 
      
 310 
     | 
    
         
            +
            #    alias :create_event_from_GL_sync_KHR :create_event_from_gl_sync_khr
         
     | 
| 
       302 
311 
     | 
    
         | 
| 
       303 
312 
     | 
    
         | 
| 
       304 
313 
     | 
    
         
             
                # Creates a user Event in the Context
         
     | 
| 
         @@ -58,7 +58,7 @@ module OpenCL 
     | 
|
| 
       58 
58 
     | 
    
         
             
            #  #
         
     | 
| 
       59 
59 
     | 
    
         
             
            #  # * +context+ - Context the created Event will be associated to
         
     | 
| 
       60 
60 
     | 
    
         
             
            #  # * +sync+ - a :GLsync representing the name of the sync object
         
     | 
| 
       61 
     | 
    
         
            -
            #  def self. 
     | 
| 
      
 61 
     | 
    
         
            +
            #  def self.create_event_from_gl_sync_khr( context, sync )
         
     | 
| 
       62 
62 
     | 
    
         
             
            #    error = FFI::MemoryPointer::new(:cl_int)
         
     | 
| 
       63 
63 
     | 
    
         
             
            #    event = clCreateEventFromGLsyncKHR(context, sync, error)
         
     | 
| 
       64 
64 
     | 
    
         
             
            #    error_check(error.read_cl_int)
         
     | 
| 
         @@ -33,7 +33,7 @@ module OpenCL 
     | 
|
| 
       33 
33 
     | 
    
         
             
              # 
         
     | 
| 
       34 
34 
     | 
    
         
             
              # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Image
         
     | 
| 
       35 
35 
     | 
    
         
             
              # * +:host_ptr+ - if provided, the Pointer (or convertible to Pointer using to_ptr) to the memory area to use
         
     | 
| 
       36 
     | 
    
         
            -
              def self. 
     | 
| 
      
 36 
     | 
    
         
            +
              def self.create_image_1d( context, format, width, options = {} )
         
     | 
| 
       37 
37 
     | 
    
         
             
                if context.platform.version_number > 1.1 then
         
     | 
| 
       38 
38 
     | 
    
         
             
                  desc = ImageDesc::new(Mem::IMAGE1D, width, 0, 0, 0, 0, 0, 0, 0, nil)
         
     | 
| 
       39 
39 
     | 
    
         
             
                  return create_image( context, format, desc, options )
         
     | 
| 
         @@ -41,6 +41,9 @@ module OpenCL 
     | 
|
| 
       41 
41 
     | 
    
         
             
                  error_check(INVALID_OPERATION)
         
     | 
| 
       42 
42 
     | 
    
         
             
                end
         
     | 
| 
       43 
43 
     | 
    
         
             
              end
         
     | 
| 
      
 44 
     | 
    
         
            +
              class << self
         
     | 
| 
      
 45 
     | 
    
         
            +
                alias :create_image_1D :create_image_1d
         
     | 
| 
      
 46 
     | 
    
         
            +
              end
         
     | 
| 
       44 
47 
     | 
    
         | 
| 
       45 
48 
     | 
    
         
             
              # Creates a 2D Image
         
     | 
| 
       46 
49 
     | 
    
         
             
              #
         
     | 
| 
         @@ -55,7 +58,7 @@ module OpenCL 
     | 
|
| 
       55 
58 
     | 
    
         
             
              # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Image
         
     | 
| 
       56 
59 
     | 
    
         
             
              # * +:host_ptr+ - if provided, the Pointer (or convertible to Pointer using to_ptr) to the memory area to use
         
     | 
| 
       57 
60 
     | 
    
         
             
              # * +:row_pitch+ - if provided the row_pitch of data in host_ptr
         
     | 
| 
       58 
     | 
    
         
            -
              def self. 
     | 
| 
      
 61 
     | 
    
         
            +
              def self.create_image_2d( context, format, width, height, options = {} )
         
     | 
| 
       59 
62 
     | 
    
         
             
                row_pitch = 0
         
     | 
| 
       60 
63 
     | 
    
         
             
                row_pitch = options[:row_pitch] if options[:row_pitch]
         
     | 
| 
       61 
64 
     | 
    
         
             
                if context.platform.version_number > 1.1 then
         
     | 
| 
         @@ -69,6 +72,9 @@ module OpenCL 
     | 
|
| 
       69 
72 
     | 
    
         
             
                error_check(error.read_cl_int)
         
     | 
| 
       70 
73 
     | 
    
         
             
                return Image::new(img_ptr, false)
         
     | 
| 
       71 
74 
     | 
    
         
             
              end
         
     | 
| 
      
 75 
     | 
    
         
            +
              class << self
         
     | 
| 
      
 76 
     | 
    
         
            +
                alias :create_image_2D :create_image_2d
         
     | 
| 
      
 77 
     | 
    
         
            +
              end
         
     | 
| 
       72 
78 
     | 
    
         | 
| 
       73 
79 
     | 
    
         
             
              # Creates a 3D Image
         
     | 
| 
       74 
80 
     | 
    
         
             
              #
         
     | 
| 
         @@ -84,7 +90,7 @@ module OpenCL 
     | 
|
| 
       84 
90 
     | 
    
         
             
              # * +:host_ptr+ - if provided, the Pointer (or convertible to Pointer using to_ptr) to the memory area to use
         
     | 
| 
       85 
91 
     | 
    
         
             
              # * +:row_pitch+ - if provided the row_pitch of data in host_ptr
         
     | 
| 
       86 
92 
     | 
    
         
             
              # * +:slice_pitch+ - if provided the slice_pitch of data in host_ptr
         
     | 
| 
       87 
     | 
    
         
            -
              def self. 
     | 
| 
      
 93 
     | 
    
         
            +
              def self.create_image_3d( context, format, width, height, depth, options = {} )
         
     | 
| 
       88 
94 
     | 
    
         
             
                row_pitch = 0
         
     | 
| 
       89 
95 
     | 
    
         
             
                row_pitch = options[:row_pitch] if options[:row_pitch]
         
     | 
| 
       90 
96 
     | 
    
         
             
                slice_pitch = 0
         
     | 
| 
         @@ -100,6 +106,9 @@ module OpenCL 
     | 
|
| 
       100 
106 
     | 
    
         
             
                error_check(error.read_cl_int)
         
     | 
| 
       101 
107 
     | 
    
         
             
                return Image::new(img_ptr, false)
         
     | 
| 
       102 
108 
     | 
    
         
             
              end
         
     | 
| 
      
 109 
     | 
    
         
            +
              class << self
         
     | 
| 
      
 110 
     | 
    
         
            +
                alias :create_image_3D :create_image_3d
         
     | 
| 
      
 111 
     | 
    
         
            +
              end
         
     | 
| 
       103 
112 
     | 
    
         | 
| 
       104 
113 
     | 
    
         
             
              # Creates an Image from an OpenGL render buffer
         
     | 
| 
       105 
114 
     | 
    
         
             
              #
         
     | 
| 
         @@ -112,13 +121,16 @@ module OpenCL 
     | 
|
| 
       112 
121 
     | 
    
         
             
              # ==== Options
         
     | 
| 
       113 
122 
     | 
    
         
             
              #
         
     | 
| 
       114 
123 
     | 
    
         
             
              # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Image (default Mem::READ_WRITE)
         
     | 
| 
       115 
     | 
    
         
            -
              def self. 
     | 
| 
      
 124 
     | 
    
         
            +
              def self.create_from_gl_render_buffer( context, renderbuffer, options = {} )
         
     | 
| 
       116 
125 
     | 
    
         
             
                flags = get_flags( options )
         
     | 
| 
       117 
126 
     | 
    
         
             
                error = FFI::MemoryPointer::new( :cl_int )
         
     | 
| 
       118 
127 
     | 
    
         
             
                img = clCreateFromGLRenderBuffer( context, flags, renderbuffer, error )
         
     | 
| 
       119 
128 
     | 
    
         
             
                error_check(error.read_cl_int)
         
     | 
| 
       120 
129 
     | 
    
         
             
                return Image::new( img, false )
         
     | 
| 
       121 
130 
     | 
    
         
             
              end
         
     | 
| 
      
 131 
     | 
    
         
            +
              class << self
         
     | 
| 
      
 132 
     | 
    
         
            +
                alias :create_from_GL_render_buffer :create_from_gl_render_buffer
         
     | 
| 
      
 133 
     | 
    
         
            +
              end
         
     | 
| 
       122 
134 
     | 
    
         | 
| 
       123 
135 
     | 
    
         
             
              # Creates an Image from an OpenGL texture
         
     | 
| 
       124 
136 
     | 
    
         
             
              #
         
     | 
| 
         @@ -133,7 +145,7 @@ module OpenCL 
     | 
|
| 
       133 
145 
     | 
    
         
             
              #
         
     | 
| 
       134 
146 
     | 
    
         
             
              # * +:miplevel+ - a :GLint specifying the mipmap level to be used (default 0)
         
     | 
| 
       135 
147 
     | 
    
         
             
              # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Image (default Mem::READ_WRITE)
         
     | 
| 
       136 
     | 
    
         
            -
              def self. 
     | 
| 
      
 148 
     | 
    
         
            +
              def self.create_from_gl_texture( context, texture_target, texture, options = {} )
         
     | 
| 
       137 
149 
     | 
    
         
             
                if context.platform.version_number < 1.2 then
         
     | 
| 
       138 
150 
     | 
    
         
             
                  error_check(INVALID_OPERATION)
         
     | 
| 
       139 
151 
     | 
    
         
             
                end
         
     | 
| 
         @@ -145,6 +157,9 @@ module OpenCL 
     | 
|
| 
       145 
157 
     | 
    
         
             
                error_check(error.read_cl_int)
         
     | 
| 
       146 
158 
     | 
    
         
             
                return Image::new( img, false )
         
     | 
| 
       147 
159 
     | 
    
         
             
              end
         
     | 
| 
      
 160 
     | 
    
         
            +
              class << self
         
     | 
| 
      
 161 
     | 
    
         
            +
                alias :create_from_GL_texture :create_from_gl_texture
         
     | 
| 
      
 162 
     | 
    
         
            +
              end
         
     | 
| 
       148 
163 
     | 
    
         | 
| 
       149 
164 
     | 
    
         
             
              # Creates an Image from an OpenGL 2D texture
         
     | 
| 
       150 
165 
     | 
    
         
             
              #
         
     | 
| 
         @@ -158,9 +173,9 @@ module OpenCL 
     | 
|
| 
       158 
173 
     | 
    
         
             
              #
         
     | 
| 
       159 
174 
     | 
    
         
             
              # * +:miplevel+ - a :GLint specifying the mipmap level to be used (default 0)
         
     | 
| 
       160 
175 
     | 
    
         
             
              # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Image
         
     | 
| 
       161 
     | 
    
         
            -
              def self. 
     | 
| 
      
 176 
     | 
    
         
            +
              def self.create_from_gl_texture_2d( context, texture_target, texture, options = {} )
         
     | 
| 
       162 
177 
     | 
    
         
             
                if context.platform.version_number > 1.1 then
         
     | 
| 
       163 
     | 
    
         
            -
                  return  
     | 
| 
      
 178 
     | 
    
         
            +
                  return create_from_gl_texture( context, texture_target, texture, options )
         
     | 
| 
       164 
179 
     | 
    
         
             
                end
         
     | 
| 
       165 
180 
     | 
    
         
             
                flags = get_flags( options )
         
     | 
| 
       166 
181 
     | 
    
         
             
                miplevel = 0
         
     | 
| 
         @@ -170,6 +185,9 @@ module OpenCL 
     | 
|
| 
       170 
185 
     | 
    
         
             
                error_check(error.read_cl_int)
         
     | 
| 
       171 
186 
     | 
    
         
             
                return Image::new( img, false )
         
     | 
| 
       172 
187 
     | 
    
         
             
              end
         
     | 
| 
      
 188 
     | 
    
         
            +
              class << self
         
     | 
| 
      
 189 
     | 
    
         
            +
                alias :create_from_GL_texture_2D :create_from_gl_texture_2d
         
     | 
| 
      
 190 
     | 
    
         
            +
              end
         
     | 
| 
       173 
191 
     | 
    
         | 
| 
       174 
192 
     | 
    
         
             
              # Creates an Image from an OpenGL 3D texture
         
     | 
| 
       175 
193 
     | 
    
         
             
              #
         
     | 
| 
         @@ -183,9 +201,9 @@ module OpenCL 
     | 
|
| 
       183 
201 
     | 
    
         
             
              #
         
     | 
| 
       184 
202 
     | 
    
         
             
              # * +:miplevel+ - a :GLint specifying the mipmap level to be used (default 0)
         
     | 
| 
       185 
203 
     | 
    
         
             
              # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Image
         
     | 
| 
       186 
     | 
    
         
            -
              def self. 
     | 
| 
      
 204 
     | 
    
         
            +
              def self.create_from_gl_texture_3d( context, texture_target, texture, options = {} )
         
     | 
| 
       187 
205 
     | 
    
         
             
                if context.platform.version_number > 1.1 then
         
     | 
| 
       188 
     | 
    
         
            -
                  return  
     | 
| 
      
 206 
     | 
    
         
            +
                  return create_from_gl_texture( context, texture_target, texture, options )
         
     | 
| 
       189 
207 
     | 
    
         
             
                end
         
     | 
| 
       190 
208 
     | 
    
         
             
                flags = get_flags( options )
         
     | 
| 
       191 
209 
     | 
    
         
             
                miplevel = 0
         
     | 
| 
         @@ -195,6 +213,9 @@ module OpenCL 
     | 
|
| 
       195 
213 
     | 
    
         
             
                error_check(error.read_cl_int)
         
     | 
| 
       196 
214 
     | 
    
         
             
                return Image::new( img, false )
         
     | 
| 
       197 
215 
     | 
    
         
             
              end
         
     | 
| 
      
 216 
     | 
    
         
            +
              class << self
         
     | 
| 
      
 217 
     | 
    
         
            +
                alias :create_from_GL_texture_3D :create_from_gl_texture_3d
         
     | 
| 
      
 218 
     | 
    
         
            +
              end
         
     | 
| 
       198 
219 
     | 
    
         | 
| 
       199 
220 
     | 
    
         
             
              # Maps the cl_mem OpenCL objects of type CL_MEM_OBJECT_IMAGE*
         
     | 
| 
       200 
221 
     | 
    
         
             
              class Image #< Mem
         
     | 
| 
         @@ -151,7 +151,7 @@ module OpenCL 
     | 
|
| 
       151 
151 
     | 
    
         
             
                  error_check(INVALID_OPERATION) if self.context.platform.version_number < 2.0
         
     | 
| 
       152 
152 
     | 
    
         
             
                  pt = FFI::MemoryPointer::new(  :cl_bool )
         
     | 
| 
       153 
153 
     | 
    
         
             
                  pt.write_cl_bool( flag )
         
     | 
| 
       154 
     | 
    
         
            -
                  error = OpenCL.clSetKernelExecInfo( self,  
     | 
| 
      
 154 
     | 
    
         
            +
                  error = OpenCL.clSetKernelExecInfo( self, EXEC_INFO_SVM_FINE_GRAIN_SYSTEM, pt.size, pt)
         
     | 
| 
       155 
155 
     | 
    
         
             
                  error_check(error)
         
     | 
| 
       156 
156 
     | 
    
         
             
                  return self
         
     | 
| 
       157 
157 
     | 
    
         
             
                end
         
     | 
| 
         @@ -206,7 +206,7 @@ module OpenCL 
     | 
|
| 
       206 
206 
     | 
    
         
             
                  OpenCL.set_kernel_arg_svm_pointer(self, index, svm_pointer)
         
     | 
| 
       207 
207 
     | 
    
         
             
                end
         
     | 
| 
       208 
208 
     | 
    
         | 
| 
       209 
     | 
    
         
            -
                # Enqueues the Kernel in the given queue, specifying the global_work_size. Arguments for the kernel are specified afterwards. Last, a hash containing options for  
     | 
| 
      
 209 
     | 
    
         
            +
                # Enqueues the Kernel in the given queue, specifying the global_work_size. Arguments for the kernel are specified afterwards. Last, a hash containing options for enqueu_ndrange kernel can be specified
         
     | 
| 
       210 
210 
     | 
    
         
             
                def enqueue_with_args(command_queue, global_work_size, *args)
         
     | 
| 
       211 
211 
     | 
    
         
             
                  n = self.num_args
         
     | 
| 
       212 
212 
     | 
    
         
             
                  error_check(INVALID_KERNEL_ARGS) if args.length < n
         
     | 
| 
         @@ -223,7 +223,7 @@ module OpenCL 
     | 
|
| 
       223 
223 
     | 
    
         
             
                      self.set_arg(i, args[i])
         
     | 
| 
       224 
224 
     | 
    
         
             
                    end
         
     | 
| 
       225 
225 
     | 
    
         
             
                  }
         
     | 
| 
       226 
     | 
    
         
            -
                  command_queue. 
     | 
| 
      
 226 
     | 
    
         
            +
                  command_queue.enqueue_ndrange_kernel(self, global_work_size, options)
         
     | 
| 
       227 
227 
     | 
    
         
             
                end
         
     | 
| 
       228 
228 
     | 
    
         | 
| 
       229 
229 
     | 
    
         
             
              end
         
     | 
    
        data/lib/opencl_ruby_ffi/Mem.rb
    CHANGED
    
    | 
         @@ -106,36 +106,40 @@ module OpenCL 
     | 
|
| 
       106 
106 
     | 
    
         
             
                end
         
     | 
| 
       107 
107 
     | 
    
         | 
| 
       108 
108 
     | 
    
         
             
                # Returns the texture_target argument specified in create_from_GL_texture for Mem
         
     | 
| 
       109 
     | 
    
         
            -
                def  
     | 
| 
      
 109 
     | 
    
         
            +
                def gl_texture_target
         
     | 
| 
       110 
110 
     | 
    
         
             
                  param_value = FFI::MemoryPointer::new( :cl_GLenum )
         
     | 
| 
       111 
111 
     | 
    
         
             
                  error = OpenCL.clGetGLTextureInfo( self, GL_TEXTURE_TARGET, param_value.size, param_value, nil )
         
     | 
| 
       112 
112 
     | 
    
         
             
                  error_check(error)
         
     | 
| 
       113 
113 
     | 
    
         
             
                  return param_value.read_cl_GLenum
         
     | 
| 
       114 
114 
     | 
    
         
             
                end
         
     | 
| 
      
 115 
     | 
    
         
            +
                alias :GL_texture_target :gl_texture_target
         
     | 
| 
       115 
116 
     | 
    
         | 
| 
       116 
117 
     | 
    
         
             
                # Returns the miplevel argument specified in create_from_GL_texture for Mem
         
     | 
| 
       117 
     | 
    
         
            -
                def  
     | 
| 
      
 118 
     | 
    
         
            +
                def gl_mimap_level
         
     | 
| 
       118 
119 
     | 
    
         
             
                  param_value = FFI::MemoryPointer::new( :cl_GLint )
         
     | 
| 
       119 
120 
     | 
    
         
             
                  error = OpenCL.clGetGLTextureInfo( self, GL_MIPMAP_LEVEL, param_value.size, param_value, nil )
         
     | 
| 
       120 
121 
     | 
    
         
             
                  error_check(error)
         
     | 
| 
       121 
122 
     | 
    
         
             
                  return param_value.read_cl_GLint
         
     | 
| 
       122 
123 
     | 
    
         
             
                end
         
     | 
| 
      
 124 
     | 
    
         
            +
                alias :GL_mimap_level :gl_mimap_level
         
     | 
| 
       123 
125 
     | 
    
         | 
| 
       124 
126 
     | 
    
         
             
                # Returns the type of the GL object associated with Mem
         
     | 
| 
       125 
     | 
    
         
            -
                def  
     | 
| 
      
 127 
     | 
    
         
            +
                def gl_object_type
         
     | 
| 
       126 
128 
     | 
    
         
             
                  param_value = FFI::MemoryPointer::new( :cl_gl_object_type )
         
     | 
| 
       127 
129 
     | 
    
         
             
                  error = OpenCL.clGetGLObjectInfo( self, param_value, nil )
         
     | 
| 
       128 
130 
     | 
    
         
             
                  error_check(error)
         
     | 
| 
       129 
131 
     | 
    
         
             
                  return GLObjectType::new(param_value.read_cl_gl_object_type)
         
     | 
| 
       130 
132 
     | 
    
         
             
                end
         
     | 
| 
      
 133 
     | 
    
         
            +
                alias :GL_object_type :gl_object_type
         
     | 
| 
       131 
134 
     | 
    
         | 
| 
       132 
135 
     | 
    
         
             
                # Returns the name of the GL object associated with Mem
         
     | 
| 
       133 
     | 
    
         
            -
                def  
     | 
| 
      
 136 
     | 
    
         
            +
                def gl_object_name
         
     | 
| 
       134 
137 
     | 
    
         
             
                  param_value = FFI::MemoryPointer::new( :cl_GLuint )
         
     | 
| 
       135 
138 
     | 
    
         
             
                  error = OpenCL.clGetGLObjectInfo( self, nil, param_value )
         
     | 
| 
       136 
139 
     | 
    
         
             
                  error_check(error)
         
     | 
| 
       137 
140 
     | 
    
         
             
                  return param_value.read_cl_GLuint
         
     | 
| 
       138 
141 
     | 
    
         
             
                end
         
     | 
| 
      
 142 
     | 
    
         
            +
                alias :GL_object_name :gl_object_name
         
     | 
| 
       139 
143 
     | 
    
         | 
| 
       140 
144 
     | 
    
         
             
              end
         
     | 
| 
       141 
145 
     | 
    
         | 
    
        data/lib/opencl_ruby_ffi/SVM.rb
    CHANGED
    
    | 
         @@ -146,7 +146,7 @@ module OpenCL 
     | 
|
| 
       146 
146 
     | 
    
         
             
              # ==== Returns
         
     | 
| 
       147 
147 
     | 
    
         
             
              #
         
     | 
| 
       148 
148 
     | 
    
         
             
              # the Event associated with the command
         
     | 
| 
       149 
     | 
    
         
            -
              def self. 
     | 
| 
      
 149 
     | 
    
         
            +
              def self.enqueue_svm_memfill(command_queue, svm_ptr, pattern, size, options = {})
         
     | 
| 
       150 
150 
     | 
    
         
             
                num_events, events = get_event_wait_list( options )
         
     | 
| 
       151 
151 
     | 
    
         
             
                pattern_size = pattern.size
         
     | 
| 
       152 
152 
     | 
    
         
             
                pattern_size = options[:pattern_size] if options[:pattern_size]
         
     | 
    
        data/opencl_ruby_ffi.gemspec
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: opencl_ruby_ffi
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.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: 2015-05- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2015-05-26 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: narray
         
     | 
| 
         @@ -120,3 +120,4 @@ signing_key: 
     | 
|
| 
       120 
120 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       121 
121 
     | 
    
         
             
            summary: Ruby OpenCL FFI bindings
         
     | 
| 
       122 
122 
     | 
    
         
             
            test_files: []
         
     | 
| 
      
 123 
     | 
    
         
            +
            has_rdoc: true
         
     |