Parameters#
- group Parameters
Functions
- cuestStatus_t cuestParametersCreate(
- cuestParametersType_t parameterType,
- void **outParameters
Create a new cuEST parameters object of the specified type.
Allocates and initializes an opaque parameter object of the type specified by
parameterType. The created object is returned viaoutParametersand must be destroyed withcuestParametersDestroy.- Parameters:
parameterType – [in] Type of parameters object to create (see
cuestParametersType_t).outParameters – [out] Pointer to receive allocated opaque parameters handle. Must not be NULL.
- Returns:
CUEST_STATUS_SUCCESSon success;CUEST_STATUS_NULL_POINTERif any required pointer is NULL;CUEST_STATUS_INVALID_TYPEifparameterTypeis not a valid parameters type;CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.
- cuestStatus_t cuestParametersDestroy(
- cuestParametersType_t parameterType,
- void *parameters
Destroy and free a cuEST parameters object of the specified type.
Properly deallocates and cleans up resources for a parameters handle created by
cuestParametersCreate.- Parameters:
parameterType – [in] Type of parameters object (must match creation).
parameters – [in] Opaque parameters handle to destroy; must not be NULL.
- Returns:
CUEST_STATUS_SUCCESSon success;CUEST_STATUS_NULL_POINTERif any required pointer is NULL;CUEST_STATUS_INVALID_TYPEif opaque handles are not the correct type;CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.
- cuestStatus_t cuestParametersQuery(
- cuestParametersType_t parameterType,
- const void *parameters,
- int attribute,
- void *attributeValue,
- size_t attributeValueSize
Query the value of a given attribute from a cuEST parameters object.
Retrieves the value associated with an attribute for the given
parametersobject. The type and meaning ofattributeandattributeValuedepend onparameterType. The result is placed inattributeValue, whose size must match the expected value size.For string-valued attributes (e.g.
CUEST_HANDLE_PARAMETERS_JIT_CACHE_DIR, queried as achar*), cuEST allocates the returned, NUL-terminated buffer with C’smallocand the caller owns it: it must be released with C’s nativefree(). This allocation only occurs when the function completes successfully (returnsCUEST_STATUS_SUCCESS). On any error status no allocation is made andattributeValueis left unchanged — cuEST never writes to it on a failing path — so a caller that pre-initializesattributeValue(e.g. toNULL) can rely on that value afterward for a deterministic cleanup pattern, and there is nothing to free.- Parameters:
parameterType – [in] Type of parameters object being queried.
parameters – [in] Opaque handle of the parameters object (must not be NULL).
attribute – [in] Integer attribute identifier (cast to appropriate attribute enum internally).
attributeValue – [out] Destination for the queried value (must not be NULL).
attributeValueSize – [in] Size in bytes of
attributeValuebuffer (must match queried type).
- Returns:
CUEST_STATUS_SUCCESSon success;CUEST_STATUS_NULL_POINTERif any required pointer is NULL;CUEST_STATUS_INVALID_TYPEif opaque handles are not the correct type;CUEST_STATUS_INVALID_SIZEifattributeValueSizedoes not match the attribute type size;CUEST_STATUS_INVALID_PARAMETERif theattributeis not valid for the givenparameterType;CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.
- cuestStatus_t cuestParametersConfigure(
- cuestParametersType_t parameterType,
- void *parameters,
- int attribute,
- const void *attributeValue,
- size_t attributeValueSize
Configure the value of a given attribute for a cuEST parameters object.
Sets or updates the value of an attribute for the given
parametersobject. The type and semantics of theattributeandattributeValuedepend onparameterType. The input value is provided as a pointer, and its size must match the expected storage for the attribute.- Parameters:
parameterType – [in] Type of parameters object to configure.
parameters – [inout] Opaque handle to parameters object (must not be NULL).
attribute – [in] Integer attribute identifier (cast to appropriate attribute enum internally).
attributeValue – [in] Pointer to the new value (must not be NULL).
attributeValueSize – [in] Size in bytes of
attributeValue(must match attribute type).
- Returns:
CUEST_STATUS_SUCCESSon success;CUEST_STATUS_NULL_POINTERif any required pointer is NULL;CUEST_STATUS_INVALID_TYPEif opaque handles are not the correct type;CUEST_STATUS_INVALID_SIZEifattributeValueSizedoes not match the attribute type size;CUEST_STATUS_INVALID_PARAMETERif theattributeis not valid for the givenparameterType;CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.