opencl_ruby_ffi 0.993 → 0.994

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,12 +13,12 @@ module OpenCL
13
13
  # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Buffer
14
14
  # * +:host_ptr+ - if provided, the Pointer (or convertible to Pointer using to_ptr) to the memory area to use
15
15
  def self.create_buffer( context, size, options = {} )
16
- flags = OpenCL.get_flags( options )
16
+ flags = get_flags( options )
17
17
  host_ptr = options[:host_ptr]
18
18
  error = FFI::MemoryPointer::new( :cl_int )
19
- buff = OpenCL.clCreateBuffer(context, flags, size, host_ptr, error)
20
- OpenCL.error_check(error.read_cl_int)
21
- return OpenCL::Buffer::new( buff, false )
19
+ buff = clCreateBuffer(context, flags, size, host_ptr, error)
20
+ error_check(error.read_cl_int)
21
+ return Buffer::new( buff, false )
22
22
  end
23
23
 
24
24
  # Creates a Buffer from a sub part of an existing Buffer
@@ -34,12 +34,12 @@ module OpenCL
34
34
  #
35
35
  # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Buffer
36
36
  def self.create_sub_buffer( buffer, type, info, options = {} )
37
- OpenCL.error_check(OpenCL::INVALID_OPERATION) if buffer.platform.version_number < 1.1
38
- flags = OpenCL.get_flags( options )
37
+ error_check(INVALID_OPERATION) if buffer.platform.version_number < 1.1
38
+ flags = get_flags( options )
39
39
  error = FFI::MemoryPointer::new( :cl_int )
40
- buff = OpenCL.clCreateSubBuffer( buffer, flags, type, info, error)
41
- OpenCL.error_check(error.read_cl_int)
42
- return OpenCL::Buffer::new( buff, false )
40
+ buff = clCreateSubBuffer( buffer, flags, type, info, error)
41
+ error_check(error.read_cl_int)
42
+ return Buffer::new( buff, false )
43
43
  end
44
44
 
45
45
  # Creates Buffer from an opengl buffer
@@ -54,11 +54,11 @@ module OpenCL
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
56
  def self.create_from_GL_buffer( context, bufobj, options = {} )
57
- flags = OpenCL.get_flags( options )
57
+ flags = get_flags( options )
58
58
  error = FFI::MemoryPointer::new( :cl_int )
59
- buff = OpenCL.clCreateFromGLBuffer( context, flags, bufobj, error )
60
- OpenCL.error_check(error.read_cl_int)
61
- return OpenCL::Buffer::new( buff, false )
59
+ buff = clCreateFromGLBuffer( context, flags, bufobj, error )
60
+ error_check(error.read_cl_int)
61
+ return Buffer::new( buff, false )
62
62
  end
63
63
 
64
64
  # Maps the cl_mem OpenCL object of type CL_MEM_OBJECT_BUFFER