Class: OpenCL::Char16

Inherits:
Struct
  • Object
show all
Defined in:
lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb

Overview

Maps the cl_char16 type of OpenCL

Instance Method Summary collapse

Constructor Details

#initialize(s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0, s8 = 0, s9 = 0, sa = 0, sb = 0, sc = 0, sd = 0, se = 0, sf = 0) ⇒ Char16

Creates a new Char16 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Char16 maps the memory pointed.



2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2517

def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0, s8 = 0, s9 = 0, sa = 0, sb = 0, sc = 0, sd = 0, se = 0, sf = 0 )
  if s0.is_a?(FFI::Pointer) then
    super(s0)
  else
    super()
    self[:s0] = s0
    self[:s1] = s1
    self[:s2] = s2
    self[:s3] = s3
    self[:s4] = s4
    self[:s5] = s5
    self[:s6] = s6
    self[:s7] = s7
    self[:s8] = s8
    self[:s9] = s9
    self[:sa] = sa
    self[:sb] = sb
    self[:sc] = sc
    self[:sd] = sd
    self[:se] = se
    self[:sf] = sf
  end
end

Instance Method Details

#inspectObject



2669
2670
2671
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2669

def inspect
  return "#<#{self.class.name}: #{self[:s0]}, #{self[:s1]}, #{self[:s2]}, #{self[:s3]}, #{self[:s4]}, #{self[:s5]}, #{self[:s6]}, #{self[:s7]}, #{self[:s8]}, #{self[:s9]}, #{self[:sa]}, #{self[:sb]}, #{self[:sc]}, #{self[:sd]}, #{self[:se]}, #{self[:sf]}>"
end

#s0Object

Reads the s0 member



2541
2542
2543
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2541

def s0
 return self[:s0]
end

#s0=(value) ⇒ Object

Sets the s0 member to value



2605
2606
2607
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2605

def s0=(value)
 self[:s0] = value
end

#s1Object

Reads the s1 member



2545
2546
2547
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2545

def s1
 return self[:s1]
end

#s1=(value) ⇒ Object

Sets the s1 member to value



2609
2610
2611
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2609

def s1=(value)
 self[:s1] = value
end

#s2Object

Reads the s2 member



2549
2550
2551
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2549

def s2
 return self[:s2]
end

#s2=(value) ⇒ Object

Sets the s2 member to value



2613
2614
2615
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2613

def s2=(value)
 self[:s2] = value
end

#s3Object

Reads the s3 member



2553
2554
2555
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2553

def s3
 return self[:s3]
end

#s3=(value) ⇒ Object

Sets the s3 member to value



2617
2618
2619
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2617

def s3=(value)
 self[:s3] = value
end

#s4Object

Reads the s4 member



2557
2558
2559
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2557

def s4
 return self[:s4]
end

#s4=(value) ⇒ Object

Sets the s4 member to value



2621
2622
2623
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2621

def s4=(value)
 self[:s4] = value
end

#s5Object

Reads the s5 member



2561
2562
2563
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2561

def s5
 return self[:s5]
end

#s5=(value) ⇒ Object

Sets the s5 member to value



2625
2626
2627
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2625

def s5=(value)
 self[:s5] = value
end

#s6Object

Reads the s6 member



2565
2566
2567
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2565

def s6
 return self[:s6]
end

#s6=(value) ⇒ Object

Sets the s6 member to value



2629
2630
2631
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2629

def s6=(value)
 self[:s6] = value
end

#s7Object

Reads the s7 member



2569
2570
2571
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2569

def s7
 return self[:s7]
end

#s7=(value) ⇒ Object

Sets the s7 member to value



2633
2634
2635
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2633

def s7=(value)
 self[:s7] = value
end

#s8Object

Reads the s8 member



2573
2574
2575
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2573

def s8
 return self[:s8]
end

#s8=(value) ⇒ Object

Sets the s8 member to value



2637
2638
2639
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2637

def s8=(value)
 self[:s8] = value
end

#s9Object

Reads the s9 member



2577
2578
2579
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2577

def s9
 return self[:s9]
end

#s9=(value) ⇒ Object

Sets the s9 member to value



2641
2642
2643
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2641

def s9=(value)
 self[:s9] = value
end

#saObject

Reads the sa member



2581
2582
2583
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2581

def sa
 return self[:sa]
end

#sa=(value) ⇒ Object

Sets the sa member to value



2645
2646
2647
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2645

def sa=(value)
 self[:sa] = value
end

#sbObject

Reads the sb member



2585
2586
2587
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2585

def sb
 return self[:sb]
end

#sb=(value) ⇒ Object

Sets the sb member to value



2649
2650
2651
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2649

def sb=(value)
 self[:sb] = value
end

#scObject

Reads the sc member



2589
2590
2591
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2589

def sc
 return self[:sc]
end

#sc=(value) ⇒ Object

Sets the sc member to value



2653
2654
2655
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2653

def sc=(value)
 self[:sc] = value
end

#sdObject

Reads the sd member



2593
2594
2595
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2593

def sd
 return self[:sd]
end

#sd=(value) ⇒ Object

Sets the sd member to value



2657
2658
2659
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2657

def sd=(value)
 self[:sd] = value
end

#seObject

Reads the se member



2597
2598
2599
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2597

def se
 return self[:se]
end

#se=(value) ⇒ Object

Sets the se member to value



2661
2662
2663
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2661

def se=(value)
 self[:se] = value
end

#sfObject

Reads the sf member



2601
2602
2603
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2601

def sf
 return self[:sf]
end

#sf=(value) ⇒ Object

Sets the sf member to value



2665
2666
2667
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2665

def sf=(value)
 self[:sf] = value
end

#to_sObject



2673
2674
2675
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 2673

def to_s
  return "Char16{ #{self[:s0]}, #{self[:s1]}, #{self[:s2]}, #{self[:s3]}, #{self[:s4]}, #{self[:s5]}, #{self[:s6]}, #{self[:s7]}, #{self[:s8]}, #{self[:s9]}, #{self[:sa]}, #{self[:sb]}, #{self[:sc]}, #{self[:sd]}, #{self[:se]}, #{self[:sf]} }"
end