Class: OpenCL::ImageDesc
- Defined in:
- lib/opencl_ruby_ffi/opencl_ruby_ffi_base.rb
Overview
Map the :cl_image_desc type of OpenCL
Instance Method Summary collapse
-
#initialize(image_type = nil, image_width = nil, image_height = nil, image_depth = nil, image_array_size = nil, image_row_pitch = nil, image_slice_pitch = nil, num_mip_levels = nil, num_samples = nil, buffer = nil) ⇒ ImageDesc
constructor
Creates anew ImageDesc using the values provided by the user.
Constructor Details
#initialize(image_type = nil, image_width = nil, image_height = nil, image_depth = nil, image_array_size = nil, image_row_pitch = nil, image_slice_pitch = nil, num_mip_levels = nil, num_samples = nil, buffer = nil) ⇒ ImageDesc
Creates anew ImageDesc using the values provided by the user
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/opencl_ruby_ffi/opencl_ruby_ffi_base.rb', line 101 def initialize( image_type = nil, image_width = nil, image_height = nil, image_depth = nil, image_array_size = nil, image_row_pitch = nil, image_slice_pitch = nil, num_mip_levels = nil, num_samples = nil, buffer = nil ) if (image_type.is_a?(FFI::Pointer)) super(image_type) else super() self[:image_type] = image_type if image_type self[:image_width] = image_width if image_width self[:image_height] = image_height if image_height self[:image_depth] = image_depth if image_depth self[:image_array_size] = image_array_size if image_array_size self[:image_row_pitch] = image_row_pitch if image_row_pitch self[:image_slice_pitch] = image_slice_pitch if image_slice_pitch self[:num_mip_levels] = num_mip_levels if num_mip_levels self[:num_samples] = num_samples if num_samples self[:buffer] = buffer if buffer end end |