hip._hip_helpers#
- class hip._hip_helpers.HipModuleLaunchKernel_extra(pyobj)#
Bases:
Pointer
Datatype for handling Python
list
ortuple
objects with entries that are eitherctypes
datatypes or that can be converted to typePointer
.Datatype for handling Python
list
ortuple
objects with entries that are eitherctypes
datatypes or that can be converted to typePointer
.The type can be initialized from the following Python objects:
-
list
ortuple
object with entries that are eitherctypes
datatypes or that can be converted to typePointer
. In this case, this type allocates an appropriately sized buffer wherein it stores the values of allctypes
datatype entries ofpyobj
plus all the addresses from the entries that can be converted to typePointer
. The buffer is padded with additional bytes to account for the alignment requirements of each entry; for more details, seehipModuleLaunchKernel
. Furthermore, the instance’sself._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 attributeself._is_ptr_owner ` remains unchanged. See `~.Pointer.__init__
for more information.
- Note:
Type checks are performed in the above order.
- See:
- __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
ortuple
object with entries that are eitherctypes
datatypes or that can be converted to typePointer
. In this case, this type allocates an appropriately sized buffer wherein it stores the values of allctypes
datatype entries ofpyobj
plus all the addresses from the entries that can be converted to typePointer
. The buffer is padded with additional bytes to account for the alignment requirements of each entry; for more details, seehipModuleLaunchKernel
. Furthermore, the instance’sself._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 attributeself._is_ptr_owner ` remains unchanged. See `~.Pointer.__init__
for more information.
-
- 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 aHipModuleLaunchKernel_extra
instance, this method returns it directly. No newHipModuleLaunchKernel_extra
is created.
- is_ptr_null#
If data pointer is NULL.
-