Query#
- cuest.bindings.cuestQuery(
- *,
- handle: cuest.bindings.cuest.cuestHandle,
- type: int,
- object: object,
- attribute: int,
- attributeValue: object,
- attributeValueSize: object | None = None,
Query an attribute of a cuEST opaque handle.
The result pointer (
attributeValue) must reference sufficient memory for the type matching the specified attribute.Parameters#
- handle[in]cuestHandle
cuEST handle. Must not be NULL.
- type[in]CuestType
enum indicating which type of object is being queried. Python enum mirroring the C API type
cuestType_t.- object[in]cuEST object handle (of the type given by
type) cuEST object to be queried (opaque handle). Must not be NULL.
- attribute[in]int
Attribute/property to query. (Should be an enum appropriate to the type of object.)
- attributeValue[out]data handle (matching the queried attribute’s type) or Pointer
Pointer to memory for result (type depends on attribute). Attributes that return GPU-resident arrays take the same
Pointerhandle as the Compute calls, wrapping a device allocation that receives the result.- attributeValueSize[in]int, optional
Size in bytes of the memory referenced by
attributeValue. When omitted, the size is inferred from the data handle type; it must be given when the size cannot be inferred from the type (e.g.sizeof(double) * numMO * numAOforCUEST_GRIDKINTPLAN_CANONICAL_ORTHOGONALIZATION_MATRIX_GPU). When given, it overrides the inferred size.
Returns#
- status[out]CuestStatus
CUEST_STATUS_SUCCESSon success;CUEST_STATUS_INVALID_HANDLEif the cuEST handle is NULL;CUEST_STATUS_NULL_POINTERifobjectis NULL;CUEST_STATUS_INVALID_SIZEif size ofattributeValuedoes not match attribute type size;CUEST_STATUS_INVALID_TYPEifattributeValuehas the wrong data type;CUEST_STATUS_INVALID_ATTRIBUTEif attribute is not recognized;CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.