hip._hip_helpers#

class hip._hip_helpers.HipModuleLaunchKernel_extra(pyobj)#

Bases: Pointer

Datatype for handling Python list or tuple objects with entries that are either ctypes datatypes or that can be converted to type Pointer.

Datatype for handling Python list or tuple objects with entries that are either ctypes datatypes or that can be converted to type Pointer.

The type can be initialized from the following Python objects:

  • list or tuple object:

    list or tuple object with entries that are either ctypes datatypes or that can be converted to type Pointer. In this case, this type allocates an appropriately sized buffer wherein it stores the values of all ctypes datatype entries of pyobj plus all the addresses from the entries that can be converted to type Pointer. The buffer is padded with additional bytes to account for the alignment requirements of each entry; for more details, see hipModuleLaunchKernel. Furthermore, the instance’s self._is_ptr_owner ` C attribute is set to `True in this case.

  • object that is accepted as input by __init__:

    In this case, init code from Pointer is used and the C attribute self._is_ptr_owner ` remains unchanged. See `~.Pointer.__init__ for more information.

Note:

Type checks are performed in the above order.

See:

hipModuleLaunchKernel

__getitem__()#

Returns a new Pointer whose pointer is this instance’s pointer offsetted by offset.

Args:

offset (int): Offset (in bytes) to add to this instance’s pointer.

__init__()#

Constructor.

The type can be initialized from the following Python objects:

  • list or tuple object:

    list or tuple object with entries that are either ctypes datatypes or that can be converted to type Pointer. In this case, this type allocates an appropriately sized buffer wherein it stores the values of all ctypes datatype entries of pyobj plus all the addresses from the entries that can be converted to type Pointer. The buffer is padded with additional bytes to account for the alignment requirements of each entry; for more details, see hipModuleLaunchKernel. Furthermore, the instance’s self._is_ptr_owner ` C attribute is set to `True in this case.

  • object that is accepted as input by __init__:

    In this case, init code from Pointer is used and the C attribute self._is_ptr_owner ` remains unchanged. See `~.Pointer.__init__ for more information.

Note:

Type checks are performed in the above order.

Args:
pyobj (object):

Must be either a list or tuple of objects that can be converted to Pointer, or any other object that is accepted as input by __init__.

See:

hipModuleLaunchKernel

as_c_void_p(self)#

Data pointer as ctypes.c_void_p.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a HipModuleLaunchKernel_extra from the given object.

In case pyobj is itself a HipModuleLaunchKernel_extra instance, this method returns it directly. No new HipModuleLaunchKernel_extra is created.

is_ptr_null#

If data pointer is NULL.