hip._hip_helpers#
- class hip._hip_helpers.HipModuleLaunchKernel_extra(pyobj)#
Bases:
PointerDatatype for handling Python
listortupleobjects with entries that are eitherctypesdatatypes or that can be converted to typePointer.Datatype for handling Python
listortupleobjects with entries that are eitherctypesdatatypes or that can be converted to typePointer.The type can be initialized from the following Python objects:
-
listortupleobject with entries that are eitherctypesdatatypes or that can be converted to typePointer. In this case, this type allocates an appropriately sized buffer wherein it stores the values of allctypesdatatype entries ofpyobjplus 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 `Truein this case. objectthat is accepted as input by__init__:In this case, init code from
Pointeris 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:
-
listortupleobject with entries that are eitherctypesdatatypes or that can be converted to typePointer. In this case, this type allocates an appropriately sized buffer wherein it stores the values of allctypesdatatype entries ofpyobjplus 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 `Truein this case. objectthat is accepted as input by__init__:In this case, init code from
Pointeris 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
Pointerthat 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
pyobjis itself aHipModuleLaunchKernel_extrainstance, this method returns it directly. No newHipModuleLaunchKernel_extrais created.
- is_ptr_null#
If data pointer is NULL.
-