Class: Yadriggy::C::CType::OclArray

Inherits:
IvarObj
  • Object
show all
Defined in:
lib/yadriggy/c/opencl.rb

Overview

OpenCL array.

Constant Summary

Constants included from Yadriggy::C::CType

Float32Array, FloatArray, Int, IntArray, Void

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Yadriggy::C::CType

#arrayof, #typedecl

Constructor Details

#initialize(size) ⇒ OclArray

Returns a new instance of OclArray.



46
47
48
# File 'lib/yadriggy/c/opencl.rb', line 46

def initialize(size)
  @size = size
end

Class Method Details

.typeObject



50
51
52
# File 'lib/yadriggy/c/opencl.rb', line 50

def self.type()
  Float32Type
end

Instance Method Details

#copyfrom(array, len) ⇒ Object



66
67
68
69
70
# File 'lib/yadriggy/c/opencl.rb', line 66

def copyfrom(array, len) ! Integer
  typedecl array: arrayof(Float32), len: Integer,
           native: 'return 0;'
  return 0
end

#copyto(array, len) ⇒ Object



72
73
74
75
76
# File 'lib/yadriggy/c/opencl.rb', line 72

def copyto(array, len) ! Integer
  typedecl array: arrayof(Float32), len: Integer,
           native: 'return 0;'
  return 0
end

#sizeObject



58
59
60
# File 'lib/yadriggy/c/opencl.rb', line 58

def size()
  @size
end

#sizesObject



62
63
64
# File 'lib/yadriggy/c/opencl.rb', line 62

def sizes()
  [ @size ]
end

#typeObject



54
55
56
# File 'lib/yadriggy/c/opencl.rb', line 54

def type()
  Float32Type
end