Class: OpenCL::Kernel::Arg
- Inherits:
- 
      Object
      
        - Object
- OpenCL::Kernel::Arg
 
- Defined in:
- lib/opencl_ruby_ffi/opencl_ruby_ffi_base_gen.rb,
 lib/opencl_ruby_ffi/opencl_ruby_ffi_base_gen.rb,
 lib/opencl_ruby_ffi/Kernel.rb,
 lib/opencl_ruby_ffi/intel/unified_shared_memory_preview.rb
Overview
Maps the logical cl arg object
Defined Under Namespace
Modules: OpenCL12, UnifiedSharedMemoryPreviewINTEL Classes: AccessQualifier, AddressQualifier, TypeQualifier
Constant Summary collapse
- ADDRESS_QUALIFIER =
- 0x1196
- ACCESS_QUALIFIER =
- 0x1197
- TYPE_NAME =
- 0x1198
- TYPE_QUALIFIER =
- 0x1199
- NAME =
- 0x119A
- ADDRESS_GLOBAL =
- 0x119B
- ADDRESS_LOCAL =
- 0x119C
- ADDRESS_CONSTANT =
- 0x119D
- ADDRESS_PRIVATE =
- 0x119E
- ACCESS_READ_ONLY =
- 0x11A0
- ACCESS_WRITE_ONLY =
- 0x11A1
- ACCESS_READ_WRITE =
- 0x11A2
- ACCESS_NONE =
- 0x11A3
- TYPE_NONE =
- 0
- TYPE_CONST =
- (1 << 0) 
- TYPE_RESTRICT =
- (1 << 1) 
- TYPE_VOLATILE =
- (1 << 2) 
- TYPE_PIPE =
- (1 << 3) 
- Extensions =
- {} 
Instance Attribute Summary collapse
- 
  
    
      #index  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the index of the Arg in the list. 
- 
  
    
      #kernel  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the Kernel this Arg belongs to. 
Class Method Summary collapse
Instance Method Summary collapse
- 
  
    
      #initialize(kernel, index)  ⇒ Arg 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    Creates a new arg for a Kernel at index. 
- 
  
    
      #platform  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Returns the Platform associated with this Arg. 
- 
  
    
      #set(value, size = nil)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Sets this Arg to value. 
Constructor Details
#initialize(kernel, index) ⇒ Arg
Creates a new arg for a Kernel at index
| 79 80 81 82 | # File 'lib/opencl_ruby_ffi/Kernel.rb', line 79 def initialize( kernel, index ) @index = index @kernel = kernel end | 
Instance Attribute Details
#index ⇒ Object (readonly)
Returns the index of the Arg in the list
| 63 64 65 | # File 'lib/opencl_ruby_ffi/Kernel.rb', line 63 def index @index end | 
#kernel ⇒ Object (readonly)
Returns the Kernel this Arg belongs to
| 65 66 67 | # File 'lib/opencl_ruby_ffi/Kernel.rb', line 65 def kernel @kernel end | 
Class Method Details
.register_extension(name, mod, cond) ⇒ Object
| 74 75 76 | # File 'lib/opencl_ruby_ffi/Kernel.rb', line 74 def self.register_extension(name, mod, cond) include mod end | 
Instance Method Details
#platform ⇒ Object
Returns the Platform associated with this Arg
| 68 69 70 | # File 'lib/opencl_ruby_ffi/Kernel.rb', line 68 def platform kernel.platform end | 
#set(value, size = nil) ⇒ Object
Sets this Arg to value. The size of value can be specified.
| 104 105 106 107 108 109 110 | # File 'lib/opencl_ruby_ffi/Kernel.rb', line 104 def set(value, size = nil) if value.class == SVMPointer and @kernel.context.platform.version_number >= 2.0 then OpenCL.set_kernel_arg_svm_pointer( @kernel, @index, value ) else OpenCL.set_kernel_arg(@kernel, @index, value, size) end end |