Objects of this class are used internally to store native data. Use Sequence or MultiArray instead.
| Memory | Objects of this class are used internally to store native data. |
| Functions | |
| Memory. | Allocate ‘size’ bytes of memory. |
| Memory. | Import data from Ruby string. |
| Memory.new | Initialize with existing memory pointer. |
| window | Returns a new Memory object which ignores part of the data. |
| load | Load data and convert to Ruby object. |
| store | Convert Ruby object to native datatype and store the data. |
| import | Import Ruby string into Malloc object. |
| export | Export data to Ruby string. |
Allocate ‘size’ bytes of memory.
def Memory.alloc( size )
Import data from Ruby string.
def Memory.import( str )
Initialize with existing memory pointer.
def Memory.new( ptr, offset = 0 )
Returns a new Memory object which ignores part of the data.
def window( offset )
Load data and convert to Ruby object.
def load( typecode )
Convert Ruby object to native datatype and store the data.
def store( typecode, value )
Import Ruby string into Malloc object.
def import( data )
Export data to Ruby string.
def export( size )
Create an array class.
def Sequence( element_type, num_elements, stride = element_type.size )
Create a multi-dimensional array class.
def MultiArray( element_type, * shape )