host Module

class host.Array(initial_value=None, name=None, ncomp=1, dtype=<class 'ctypes.c_double'>)

Bases: object

Basic dynamic memory array on host, with some methods.

ctypes_data
ctypes_data_access(mode=Read and write., pair=True)
ctypes_data_post(mode=Read and write.)
dtype
end

Returns end index of array.

inc_version(inc=1)

Increment the version by the specified amount :param int inc: amount to increment version by.

ncomp
realloc(length)
size
version

Get the version of this array. :return int version:

zero()
class host.Matrix(nrow=1, ncol=1, initial_value=None, dtype=<class 'ctypes.c_double'>)

Bases: object

Basic dynamic memory matrix on host, with some methods.

ctypes_data
ctypes_data_access(mode=Read and write.)
Parameters:mode (access) – Access type required by the calling method.
Returns:The pointer to the data.
ctypes_data_post(mode=Read and write.)
data
dtype
inc_version(inc=1)

Increment the version by the specified amount :param int inc: amount to increment version by.

ncol
nrow
realloc(nrow, ncol)
size
version

Get the version of this array. :return int version:

zero()
class host.PointerArray(length, dtype)

Bases: object

Class to store arrays of pointers.

Parameters:
  • length (int) – Length of array.
  • dtype (ctypes.dtype) – pointer data type.
ctypes_data

Returns pointer to start of array.

dtype

Returns data type.

ncomp

Return number of components

host.available_free_memory()

Get available free memory in bytes. :return: Free memory in bytes.

host.null_matrix(dtype)

Return a Null*Matrix based on passed type. :param dtype: Data type of Null matrix. :return: Null Matrix.

host.pointer_offset(ptr=None, offset=0)

Add offset number of bytes to pointer ptr, returns ctypes void ptr :param ptr: original pointer :param offset: offset in bytes

Previous topic

halo Module

Next topic

kernel Module

This Page