Module: OpenCL::Program::OpenCL22
- Included in:
- OpenCL::Program
- Defined in:
- lib/opencl_ruby_ffi/Program.rb
Instance Method Summary collapse
-
#scope_global_ctors_present ⇒ Object
Returns the OpenCL::Program::scope_global_ctors_present info.
-
#scope_global_dtors_present ⇒ Object
Returns the OpenCL::Program::scope_global_dtors_present info.
-
#set_release_callback(options = {}, &block) ⇒ Object
Attaches a callback to the Program that will be called on program release.
-
#set_specialization_constant(spec_id, spec_value, spec_size = nil) ⇒ Object
Sets a specialization constant in a program.
Instance Method Details
#scope_global_ctors_present ⇒ Object
Returns the OpenCL::Program::scope_global_ctors_present info
523 |
# File 'lib/opencl_ruby_ffi/Program.rb', line 523 get_info("Program", :cl_bool, "scope_global_ctors_present") |
#scope_global_dtors_present ⇒ Object
Returns the OpenCL::Program::scope_global_dtors_present info
524 |
# File 'lib/opencl_ruby_ffi/Program.rb', line 524 get_info("Program", :cl_bool, "scope_global_dtors_present") |
#set_release_callback(options = {}, &block) ⇒ Object
Attaches a callback to the Program that will be called on program release
Attributes
-
options
- a hash containing named options -
block
- if provided, a callback invoked when Program is released. Signature of the callback is { |Pointer to the Program, Pointer to user_data| … }
Options
-
:user_data
- a Pointer (or convertible to Pointer using to_ptr) to the memory area to pass to the callback
536 537 538 539 |
# File 'lib/opencl_ruby_ffi/Program.rb', line 536 def set_release_callback( = {}, &block ) OpenCL.set_program_release_callback( self, , &block ) return self end |
#set_specialization_constant(spec_id, spec_value, spec_size = nil) ⇒ Object
Sets a specialization constant in a program
Attributes
-
program
- the Program to which constant needs to be set -
spec_id
- the id of the specialization constant -
spec_value
- value the constant must be set to -
spec_size
- optional spec_value size
549 550 551 552 |
# File 'lib/opencl_ruby_ffi/Program.rb', line 549 def set_specialization_constant( spec_id, spec_value, spec_size = nil) OpenCL.set_program_specialization_constant( self, spec_id, spec_value, spec_size) return self end |