# QairtContext

Note

Some methods in this module are not yet implemented in the current release
and will raise an exception if called. See the C API for full functionality.

**Include:** `#include "QairtCppApi/QairtContext.hpp"`

C++ wrapper for the QAIRT context API.

A Backend must be created before constructing a Context object.
    Copy to clipboard

- namespace qairt

    - Enums

- enum class ContextBinaryCompatibilityType : std::underlying\_type\_t&lt;[QairtContext\_BinaryCompatibilityType\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv438QairtContext_BinaryCompatibilityType_t)&gt;

    - Binary compatibility policy used when loading a cached context binary.

| Enumerator | Description |
| --- | --- |
| `Permissive` | Binary is accepted if it can run on the device. Default policy. |
| `Strict` | Binary is accepted only if it fully utilizes hardware capability. |
| `Undefined` | Sentinel value; not a valid policy selection. |

*Values:*

- enumerator Permissive = [QAIRT\_CONTEXT\_BINARY\_COMPATIBILITY\_PERMISSIVE](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N38QairtContext_BinaryCompatibilityType_t45QAIRT_CONTEXT_BINARY_COMPATIBILITY_PERMISSIVEE)

    - 

- enumerator Strict = [QAIRT\_CONTEXT\_BINARY\_COMPATIBILITY\_STRICT](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N38QairtContext_BinaryCompatibilityType_t41QAIRT_CONTEXT_BINARY_COMPATIBILITY_STRICTE)

    - 

- enumerator Undefined = [QAIRT\_CONTEXT\_BINARY\_COMPATIBILITY\_TYPE\_UNDEFINED](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N38QairtContext_BinaryCompatibilityType_t49QAIRT_CONTEXT_BINARY_COMPATIBILITY_TYPE_UNDEFINEDE)

    -

- enum class ContextError : std::underlying\_type\_t&lt;[QairtContext\_Error\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv420QairtContext_Error_t)&gt;

    - Error codes returned by QAIRT context operations.

| Enumerator | Description |
| --- | --- |
| `NoError` | Operation succeeded. |
| `UnsupportedFeature` | An optional API feature is not supported by the backend. |
| `MemAlloc` | Memory allocation or deallocation failure. |
| `InvalidArgument` | An argument to the operation was invalid. |
| `CtxDoesNotExist` | The context has not yet been created in the backend. |
| `InvalidHandle` | The provided handle is not valid. |
| `NotFinalized` | Operation attempted before all graphs in the context were finalized. |
| `BinaryVersion` | The context binary has an incompatible version. |
| `CreateFromBinary` | Failed to create a context from a binary. |
| `GetBinarySizeFailed` | Failed to retrieve the size of the serialized context. |
| `GetBinaryFailed` | Failed to generate the serialized context. |
| `BinaryConfiguration` | The context binary configuration is invalid. |
| `SetProfile` | Failed to set profiling information. |
| `InvalidConfig` | One or more configuration values are invalid. |
| `BinarySuboptimal` | A suboptimal binary was used with strict compatibility mode. |
| `Aborted` | Call was aborted early due to a signal trigger. |
| `TimedOut` | Call was aborted early due to a signal timeout. |
| `IncrementInvalidBuffer` | The incremental binary buffer was not allocated by the backend. |
| `Undefined` | An undefined or unknown error occurred. |

*Values:*

- enumerator NoError = [QAIRT\_CONTEXT\_NO\_ERROR](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N20QairtContext_Error_t22QAIRT_CONTEXT_NO_ERRORE)

    - 

- enumerator UnsupportedFeature = [QAIRT\_CONTEXT\_ERROR\_UNSUPPORTED\_FEATURE](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N20QairtContext_Error_t39QAIRT_CONTEXT_ERROR_UNSUPPORTED_FEATUREE)

    - 

- enumerator MemAlloc = [QAIRT\_CONTEXT\_ERROR\_MEM\_ALLOC](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N20QairtContext_Error_t29QAIRT_CONTEXT_ERROR_MEM_ALLOCE)

    - 

- enumerator InvalidArgument = [QAIRT\_CONTEXT\_ERROR\_INVALID\_ARGUMENT](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N20QairtContext_Error_t36QAIRT_CONTEXT_ERROR_INVALID_ARGUMENTE)

    - 

- enumerator CtxDoesNotExist = [QAIRT\_CONTEXT\_ERROR\_CTX\_DOES\_NOT\_EXIST](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N20QairtContext_Error_t38QAIRT_CONTEXT_ERROR_CTX_DOES_NOT_EXISTE)

    - 

- enumerator InvalidHandle = [QAIRT\_CONTEXT\_ERROR\_INVALID\_HANDLE](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N20QairtContext_Error_t34QAIRT_CONTEXT_ERROR_INVALID_HANDLEE)

    - 

- enumerator NotFinalized = [QAIRT\_CONTEXT\_ERROR\_NOT\_FINALIZED](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N20QairtContext_Error_t33QAIRT_CONTEXT_ERROR_NOT_FINALIZEDE)

    - 

- enumerator BinaryVersion = [QAIRT\_CONTEXT\_ERROR\_BINARY\_VERSION](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N20QairtContext_Error_t34QAIRT_CONTEXT_ERROR_BINARY_VERSIONE)

    - 

- enumerator CreateFromBinary = [QAIRT\_CONTEXT\_ERROR\_CREATE\_FROM\_BINARY](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N20QairtContext_Error_t38QAIRT_CONTEXT_ERROR_CREATE_FROM_BINARYE)

    - 

- enumerator GetBinarySizeFailed = [QAIRT\_CONTEXT\_ERROR\_GET\_BINARY\_SIZE\_FAILED](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N20QairtContext_Error_t42QAIRT_CONTEXT_ERROR_GET_BINARY_SIZE_FAILEDE)

    - 

- enumerator GetBinaryFailed = [QAIRT\_CONTEXT\_ERROR\_GET\_BINARY\_FAILED](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N20QairtContext_Error_t37QAIRT_CONTEXT_ERROR_GET_BINARY_FAILEDE)

    - 

- enumerator BinaryConfiguration = [QAIRT\_CONTEXT\_ERROR\_BINARY\_CONFIGURATION](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N20QairtContext_Error_t40QAIRT_CONTEXT_ERROR_BINARY_CONFIGURATIONE)

    - 

- enumerator SetProfile = [QAIRT\_CONTEXT\_ERROR\_SET\_PROFILE](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N20QairtContext_Error_t31QAIRT_CONTEXT_ERROR_SET_PROFILEE)

    - 

- enumerator InvalidConfig = [QAIRT\_CONTEXT\_ERROR\_INVALID\_CONFIG](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N20QairtContext_Error_t34QAIRT_CONTEXT_ERROR_INVALID_CONFIGE)

    - 

- enumerator BinarySuboptimal = [QAIRT\_CONTEXT\_ERROR\_BINARY\_SUBOPTIMAL](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N20QairtContext_Error_t37QAIRT_CONTEXT_ERROR_BINARY_SUBOPTIMALE)

    - 

- enumerator Aborted = [QAIRT\_CONTEXT\_ERROR\_ABORTED](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N20QairtContext_Error_t27QAIRT_CONTEXT_ERROR_ABORTEDE)

    - 

- enumerator TimedOut = [QAIRT\_CONTEXT\_ERROR\_TIMED\_OUT](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N20QairtContext_Error_t29QAIRT_CONTEXT_ERROR_TIMED_OUTE)

    - 

- enumerator IncrementInvalidBuffer = [QAIRT\_CONTEXT\_ERROR\_INCREMENT\_INVALID\_BUFFER](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N20QairtContext_Error_t44QAIRT_CONTEXT_ERROR_INCREMENT_INVALID_BUFFERE)

    - 

- enumerator Undefined = [QAIRT\_CONTEXT\_ERROR\_UNDEFINED](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N20QairtContext_Error_t29QAIRT_CONTEXT_ERROR_UNDEFINEDE)

    -

- enum class ContextBinaryType : std::underlying\_type\_t&lt;[QairtContext\_BinaryType\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv425QairtContext_BinaryType_t)&gt;

    - Storage format of a context binary.

| Enumerator | Description |
| --- | --- |
| `Raw` | Binary stored as a raw memory buffer. |
| `MemHandle` | Binary referenced via a memory handle. |
| `Undefined` | Sentinel value; not a valid binary type. |

*Values:*

- enumerator Raw = [QAIRT\_CONTEXT\_BINARY\_TYPE\_RAW](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N25QairtContext_BinaryType_t29QAIRT_CONTEXT_BINARY_TYPE_RAWE)

    - 

- enumerator MemHandle = [QAIRT\_CONTEXT\_BINARY\_TYPE\_MEM\_HANDLE](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N25QairtContext_BinaryType_t36QAIRT_CONTEXT_BINARY_TYPE_MEM_HANDLEE)

    - 

- enumerator Undefined = [QAIRT\_CONTEXT\_BINARY\_TYPE\_UNDEFINED](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N25QairtContext_BinaryType_t35QAIRT_CONTEXT_BINARY_TYPE_UNDEFINEDE)

    -

- enum class ContextSectionType : std::underlying\_type\_t&lt;[QairtContext\_SectionType\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv426QairtContext_SectionType_t)&gt;

    - Portion of the context binary targeted by section operations.

| Enumerator | Description |
| --- | --- |
| `Updatable` | Section containing all recent updates applied via tensor update APIs. |
| `UpdatableWeights` | Section containing recent static weight updates only. |
| `UpdatableQuantParams` | Section containing recent quantization parameter updates only. |
| `Undefined` | Sentinel value; not a valid section type. |

*Values:*

- enumerator Updatable = [QAIRT\_CONTEXT\_SECTION\_UPDATABLE](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N26QairtContext_SectionType_t31QAIRT_CONTEXT_SECTION_UPDATABLEE)

    - 

- enumerator UpdatableWeights = [QAIRT\_CONTEXT\_SECTION\_UPDATABLE\_WEIGHTS](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N26QairtContext_SectionType_t39QAIRT_CONTEXT_SECTION_UPDATABLE_WEIGHTSE)

    - 

- enumerator UpdatableQuantParams = [QAIRT\_CONTEXT\_SECTION\_UPDATABLE\_QUANT\_PARAMS](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N26QairtContext_SectionType_t44QAIRT_CONTEXT_SECTION_UPDATABLE_QUANT_PARAMSE)

    - 

- enumerator Undefined = [QAIRT\_CONTEXT\_SECTION\_UNDEFINED](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv4N26QairtContext_SectionType_t31QAIRT_CONTEXT_SECTION_UNDEFINEDE)

    -

- class Context : public [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::ApiType&lt;[Context](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt7ContextE), [QairtContext\_V1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv417QairtContext_V1_t)&gt;

    - Public Functions

- Context() = default

    - 

- Context(const [Context](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt7Context7ContextERK7Context)&) = delete

    - 

- Context([Context](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt7Context7ContextERR7Context)&&) noexcept = default

    - 

- [Context](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt7ContextE) &operator=(const [Context](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt7ContextE)&) = delete

    - 

- [Context](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt7ContextE) &operator=([Context](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt7ContextE)&&) noexcept = default

    - 

- inline Context(const std::shared\_ptr&lt;ApiTable&gt; &apiTable, [QairtContext\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv421QairtContext_Handle_t) handle)

    - 

- inline void setConfig(const [ContextConfiguration](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt20ContextConfigurationE) &config)

    - Set or modify configuration options on this context.

Backends are not required to support reconfiguration after context creation. If the backend does not support the provided configuration, this call will fail.

See also

[QairtContext\_setConfig](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContext_8h_1ac0356b073b42d8edb9d5048be52394f5)

- Parameters

    - **config** – **[in]** [Context](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#classqairt_1_1Context) configuration object containing the options to apply.

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle, unsupported feature, or invalid configuration.

- template&lt;typename T&gt;  
inline std::enable\_if\_t&lt;std::is\_base\_of\_v&lt;[ContextCustomConfiguration](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt26ContextCustomConfigurationE), [T](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4I0EN5qairt7Context16setConfigurationENSt11enable_if_tINSt12is_base_of_vI26ContextCustomConfiguration1TEEEERK1T)&gt;&gt; setConfiguration(const [T](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4I0EN5qairt7Context16setConfigurationENSt11enable_if_tINSt12is_base_of_vI26ContextCustomConfiguration1TEEEERK1T) &customConfigs)

    - Apply a collection of backend-specific custom configuration entries to this context.

- Parameters

    - **customConfigs** – **[in]** Backend-specific custom configuration collection whose handles are applied individually to this context.

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle.

- inline uint64\_t getBinarySize() const

    - Get the size in bytes of the serialized binary representation of this context.

All graphs in the context must be finalized before calling this method. Call [getBinary()](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#classqairt_1_1Context_1a321b460b9330e51fc0db8368d8007d53) or [getBinary(void\*, uint64\_t)](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#classqairt_1_1Context_1a4777c57b3e8eff1e9f4cf355ff26e7a1) after allocating a buffer of at least this size.

See also

[QairtContext\_getBinarySize](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContext_8h_1a7d7bead576c552cfaa35cc7c4ce02a20)

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on:

- invalid handle
- unsupported feature
- unfinalized graphs in the context
- other retrieval failure

- Returns

    - Size in bytes required to hold the serialized context binary.

- inline uint64\_t getBinary([ContextBinaryBuffer](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt19ContextBinaryBufferE) &buffer)

    - Serialize this context into the provided binary buffer.

All graphs in the context must be finalized before calling this method. Call [getBinarySize()](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#classqairt_1_1Context_1a2c297ab8963a6352cd3c3944b93d54bf) first to determine the required buffer size. The buffer’s data pointer and size must be set before calling this method.

See also

[QairtContext\_getBinary](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContext_8h_1a6a8cbde4943c9cc6d85cd069f686e339)

- Parameters

    - **buffer** – **[inout]** Pre-allocated binary buffer to receive the serialized context. The buffer’s size field must be at least [getBinarySize()](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#classqairt_1_1Context_1a2c297ab8963a6352cd3c3944b93d54bf) bytes.

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on:

- invalid handle
- unsupported feature
- unfinalized graphs in the context
- other serialization failure

- Returns

    - Number of bytes written into the buffer.

- inline uint64\_t getBinary(void \*buffer, uint64\_t bufferSize)

    - Wrapper which allows for serializing directly into a caller-managed raw memory buffer.

See also

[Context::getBinary(ContextBinaryBuffer&)](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#classqairt_1_1Context_1a321b460b9330e51fc0db8368d8007d53)

- inline void updateContextTensors(const std::vector&lt;[Tensor](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtTensor.html#_CPPv4N5qairt6TensorE)\*&gt; &tensors)

    - Update the data and quantization parameters of previously created context tensors.

Valid fields to update depend on tensor type:

- UPDATEABLE\_STATIC: data and quantization parameters.
- UPDATEABLE\_NATIVE, UPDATEABLE\_APP\_READ, UPDATEABLE\_APP\_WRITE, UPDATEABLE\_APP\_READWRITE: quantization parameters only.

Updates take effect only after QairtGraph\_finalize() is called for one or more of the graphs to which the context tensors are associated.

See also

[QairtContext\_updateContextTensors](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContext_8h_1a3cf5e0bc2036ee3b9ea15bb162287ac6)

- Parameters

    - **tensors** – **[in]** Pointers to tensors to update. Each tensor must carry the ID assigned during tensor creation.

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on:

- invalid context or tensor handle
- NULL tensor handle array
- incompatible tensor type
- unsupported feature

- inline uint64\_t getBinarySectionSize(const [Graph](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtGraph.html#_CPPv4N5qairt5GraphE) &graph, [ContextSectionType](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt18ContextSectionTypeE) section) const

    - Get the size in bytes of a binary section for a specific graph.

All graphs in the context must be finalized before calling this method. Use this to determine the buffer size needed before calling [getBinarySection()](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#classqairt_1_1Context_1a4c4e6dfa533af9a6eb5f2de98e84156f).

See also

[QairtContext\_getBinarySectionSize](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContext_8h_1a3aa08e2653eaf16da9a7f50bf068ead0)

- Parameters

    - - **graph** – **[in]** [Graph](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtGraph.html#classqairt_1_1Graph) whose binary section size is queried.
- **section** – **[in]** Portion of the context binary to query.

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on:

- invalid handle
- unsupported feature
- unfinalized graphs in the context
- other retrieval failure

- Returns

    - Size in bytes needed to hold the requested binary section.

- inline uint64\_t getBinarySection(const [Graph](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtGraph.html#_CPPv4N5qairt5GraphE) &graph, [ContextSectionType](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt18ContextSectionTypeE) section, [ContextBinaryBuffer](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt19ContextBinaryBufferE) &buffer, ApiTypeRef&lt;const [Profile](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtProfile.html#_CPPv4N5qairt7ProfileE)&&gt; profile, ApiTypeRef&lt;const [Signal](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtSignal.html#_CPPv4N5qairt6SignalE)&&gt; signal)

    - Retrieve a section of the context binary for a specific graph.

All graphs in the context must be finalized before calling this method. Call [getBinarySectionSize()](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#classqairt_1_1Context_1ab38c3c184bb374eb55cbf1efec772268) first to determine the required buffer size. The signal, if non-null, is considered in-use for the duration of this call.

See also

[QairtContext\_getBinarySection](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContext_8h_1aafa9d6f1ced8cb6afc4122b90258400a)

- Parameters

    - - **graph** – **[in]** [Graph](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtGraph.html#classqairt_1_1Graph) whose binary section is retrieved.
- **section** – **[in]** Portion of the context binary to retrieve.
- **buffer** – **[inout]** Pre-allocated binary buffer to receive the section. Must be sized to at least [getBinarySectionSize()](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#classqairt_1_1Context_1ab38c3c184bb374eb55cbf1efec772268) bytes.
- **profile** – **[in]** Optional profile handle to collect metrics.
- **signal** – **[in]** Optional signal handle for controlling the operation.

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on:

- invalid handle
- unsupported feature
- unfinalized graphs in the context
- other serialization failure

- Returns

    - Number of bytes written into the buffer.

- inline void applyBinarySection(const [Graph](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtGraph.html#_CPPv4N5qairt5GraphE) &graph, [ContextSectionType](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt18ContextSectionTypeE) section, [ContextBinaryBuffer](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt19ContextBinaryBufferE) &buffer, ApiTypeRef&lt;const [Profile](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtProfile.html#_CPPv4N5qairt7ProfileE)&&gt; profile, ApiTypeRef&lt;const [Signal](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtSignal.html#_CPPv4N5qairt6SignalE)&&gt; signal)

    - Apply a previously retrieved binary section to this context.

See also

[QairtContext\_applyBinarySection](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContext_8h_1a13e98317786959ac022c5c448d879675)

- Parameters

    - - **graph** – **[in]** [Graph](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtGraph.html#classqairt_1_1Graph) to which the binary section applies.
- **section** – **[in]** Portion of the context binary being applied.
- **buffer** – **[in]** Binary buffer containing the section to apply. When persistent binary mode is enabled, this buffer must remain valid through context teardown.
- **profile** – **[in]** Optional profile handle to collect metrics.
- **signal** – **[in]** Optional signal handle for controlling the operation.

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on:

- invalid handle
- unsupported feature
- memory allocation failure
- profiling error

- inline [Graph](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtGraph.html#_CPPv4N5qairt5GraphE) createGraph(const char \*graphName, ApiTypeRef&lt;const [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[GraphConfiguration](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtGraph.html#_CPPv4N5qairt18GraphConfigurationE)&&gt; graphConfiguration)

    - Create a new graph within this context.

See also

[QairtContext\_createGraph](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContext_8h_1a50c45361cd3cb126796332423d8b9cc9)

- Parameters

    - - **graphName** – **[in]** Unique null-terminated identifier for the graph within this context.
- **graphConfiguration** – **[in]** Configuration options for the graph. Optional.

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on:

- invalid context handle
- NULL or duplicate graph name
- memory or resource allocation failure
- unsupported configuration options

- Returns

    - The newly created [Graph](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtGraph.html#classqairt_1_1Graph) object.

- inline std::shared\_ptr&lt;[Graph](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtGraph.html#_CPPv4N5qairt5GraphE)&gt; retrieveGraph(const char \*graphName)

    - See also

[Context::retrieveGraph(const std::string&)](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#classqairt_1_1Context_1ac580a6c6c11ed2cc441b7dc5ed4efc7a)

- inline std::shared\_ptr&lt;[Graph](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtGraph.html#_CPPv4N5qairt5GraphE)&gt; retrieveGraph(const std::string &graphName)

    - Retrieve an existing graph from this context by name.

See also

[QairtContext\_retrieveGraph](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContext_8h_1ac99a42ea39a9954e3f8072d9aa4668f2)

- Parameters

    - **graphName** – **[in]** Name of the graph to retrieve.

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on:

- invalid context handle
- NULL or invalid graph name
- no graph with the specified name exists in this context
- memory allocation failure

- Returns

    - Shared pointer to the retrieved [Graph](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtGraph.html#classqairt_1_1Graph) object.

- inline void setFreeProfile([Profile](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtProfile.html#_CPPv4N5qairt7ProfileE) &profile)

    - Set the profile handle used to collect metrics during context teardown.

See also

[QairtContext\_free](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContext_8h_1a2aeb6df500a8f0703b9993d75af10efa)

- Parameters

    - **profile** – **[in]** [Profile](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtProfile.html#classqairt_1_1Profile) object to populate during context teardown.

- template&lt;typename T, typename U, typename V&gt;  
inline ApiType(const [ApiType](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4I000EN5qairt7Context7ApiTypeERK7ApiTypeI1T1U1VEN6detail17non_owning_handleI11handle_typeEE)&lt;[T](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4I000EN5qairt7Context7ApiTypeERK7ApiTypeI1T1U1VEN6detail17non_owning_handleI11handle_typeEE), [U](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4I000EN5qairt7Context7ApiTypeERK7ApiTypeI1T1U1VEN6detail17non_owning_handleI11handle_typeEE), [V](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4I000EN5qairt7Context7ApiTypeERK7ApiTypeI1T1U1VEN6detail17non_owning_handleI11handle_typeEE)&gt; &parent, [detail](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtTypeTraits.html#_CPPv4N5qairt6detailE)::non\_owning\_handle&lt;handle\_type&gt; noh)

    - 

- inline explicit ApiType(const std::shared\_ptr&lt;T\_Table&gt; &apiTable)

    - 

- inline ApiType(copy\_table\_tag\_t, const [ApiType](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt7Context7ApiTypeE16copy_table_tag_tRK7ApiType) &other)

    - 

- ApiType() noexcept = default

    - 

- ApiType(const [ApiType](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt7Context7ApiTypeERK7ApiType)&) = delete

    - 

- ApiType([ApiType](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt7Context7ApiTypeERR7ApiType)&&) noexcept = default

    - 

- [ApiType](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4I000EN5qairt7Context7ApiTypeERK7ApiTypeI1T1U1VEN6detail17non_owning_handleI11handle_typeEE) &operator=(const [ApiType](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4I000EN5qairt7Context7ApiTypeERK7ApiTypeI1T1U1VEN6detail17non_owning_handleI11handle_typeEE)&) = delete

    - 

- [ApiType](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4I000EN5qairt7Context7ApiTypeERK7ApiTypeI1T1U1VEN6detail17non_owning_handleI11handle_typeEE) &operator=([ApiType](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4I000EN5qairt7Context7ApiTypeERK7ApiTypeI1T1U1VEN6detail17non_owning_handleI11handle_typeEE)&&) noexcept = default

    -

Private Functions

- inline Context(const std::shared\_ptr&lt;ApiTable&gt; &apiTable, [QairtBackend\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtBackend.html#_CPPv421QairtBackend_Handle_t) backendHandle, [QairtDevice\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtDevice.html#_CPPv420QairtDevice_Handle_t) deviceHandle, [QairtContext\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv427QairtContext_ConfigHandle_t) contextConfigHandle)

    - 

- inline Context(const std::shared\_ptr&lt;ApiTable&gt; &apiTable, [QairtBackend\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtBackend.html#_CPPv421QairtBackend_Handle_t) backendHandle, [QairtDevice\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtDevice.html#_CPPv420QairtDevice_Handle_t) deviceHandle, [QairtContext\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv427QairtContext_ConfigHandle_t) contextConfigHandle, [QairtContext\_BinaryBufferHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv433QairtContext_BinaryBufferHandle_t) binaryBufferHandle, [QairtSignal\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtSignal.html#_CPPv420QairtSignal_Handle_t) signalHandle = nullptr, [QairtProfile\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtProfile.html#_CPPv421QairtProfile_Handle_t) profileHandle = nullptr)

    - 

- inline void customFree([QairtContext\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv421QairtContext_Handle_t) handle) const

    -

Private Members

- friend Api

    - 

- [QairtProfile\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtProfile.html#_CPPv421QairtProfile_Handle_t) m\_freeProfileHandle = nullptr

    - [Profile](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtProfile.html#classqairt_1_1Profile) handle used to collect metrics during context teardown.

Friends

- *friend class* ::qairt::ApiType

- class ContextAsyncExecutionQueueDepth : public [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::ApiType&lt;[ContextAsyncExecutionQueueDepth](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt31ContextAsyncExecutionQueueDepthE), [QairtContext\_AsyncExecutionDepthV1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv436QairtContext_AsyncExecutionDepthV1_t)&gt;

    - *#include &lt;QairtContext.hpp&gt;*

Queue depth configuration for asynchronous context execution.

Public Functions

- ContextAsyncExecutionQueueDepth() noexcept = default

    - 

- ContextAsyncExecutionQueueDepth([ContextAsyncExecutionQueueDepth](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt31ContextAsyncExecutionQueueDepth31ContextAsyncExecutionQueueDepthERR31ContextAsyncExecutionQueueDepth)&&) noexcept = default

    - 

- [ContextAsyncExecutionQueueDepth](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt31ContextAsyncExecutionQueueDepthE) &operator=([ContextAsyncExecutionQueueDepth](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt31ContextAsyncExecutionQueueDepthE)&&) noexcept = default

    - 

- inline uint32\_t getDepth() const

    - Get the current queue depth for asynchronous execution.

See also

[QairtContext\_AsyncExecutionGetDepth](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextConfig_8h_1a74f6969f1bfb7408f1cff5511c52bb60)

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle.

- Returns

    - Maximum number of outstanding asynchronous execution requests.

- inline void setDepth(uint32\_t depth)

    - Set the queue depth for asynchronous execution.

See also

[QairtContext\_AsyncExecutionSetDepth](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextConfig_8h_1ad5d2862fc8468dc744f467fbcc48eeb8)

- Parameters

    - **depth** – **[in]** Maximum number of outstanding asynchronous execution requests.

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle or invalid argument.

Private Functions

- inline explicit ContextAsyncExecutionQueueDepth(const std::shared\_ptr&lt;ApiTable&gt; &apiTable)

    -

Friends

- *friend class* Api

- class ContextBinary : public [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::ApiType&lt;[ContextBinary](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt13ContextBinaryE), [QairtContext\_BinaryV1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv423QairtContext_BinaryV1_t)&gt;

    - *#include &lt;QairtContext.hpp&gt;*

Descriptor pairing a binary type with its associated buffer for context serialization.

Public Functions

- ContextBinary() noexcept = default

    - 

- ContextBinary([ContextBinary](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt13ContextBinary13ContextBinaryERR13ContextBinary)&&) noexcept = default

    - 

- [ContextBinary](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt13ContextBinaryE) &operator=([ContextBinary](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt13ContextBinaryE)&&) noexcept = default

    - 

- inline [ContextBinaryType](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt17ContextBinaryTypeE) getType() const

    - Get the storage format type of this context binary.

See also

[QairtContext\_binaryGetType](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextBinary_8h_1aec6baa6b8dde50f8dced96e42ec0340a)

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle.

- Returns

    - Storage format of this binary (e.g., Raw or MemHandle).

- inline [ContextBinaryBuffer](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt19ContextBinaryBufferE) &getBuffer()

    - Get the binary buffer associated with this context binary.

See also

[QairtContext\_binaryGetBuffer](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextBinary_8h_1a34823f9114f09cc004fac6c2d881352d)

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle.

- Returns

    - Reference to the associated [ContextBinaryBuffer](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#classqairt_1_1ContextBinaryBuffer).

- inline const [ContextBinaryBuffer](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt19ContextBinaryBufferE) &getBuffer() const

    - Get the binary buffer associated with this context binary.

See also

[QairtContext\_binaryGetBuffer](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextBinary_8h_1a34823f9114f09cc004fac6c2d881352d)

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle.

- Returns

    - Const reference to the associated [ContextBinaryBuffer](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#classqairt_1_1ContextBinaryBuffer).

- inline void setBuffer([ContextBinaryBuffer](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt19ContextBinaryBufferE) &&buffer)

    - Set the binary buffer for this context binary.

See also

[QairtContext\_binarySetBuffer](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextBinary_8h_1a7338a45c2453779013b15d96b606be12)

- Parameters

    - **buffer** – **[in]** Binary buffer to associate with this context binary object.

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle.

Private Members

- friend Api

    - 

- [detail](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtTypeTraits.html#_CPPv4N5qairt6detailE)::crossable&lt;[detail](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtTypeTraits.html#_CPPv4N5qairt6detailE)::non\_owning&lt;[ContextBinaryBuffer](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt19ContextBinaryBufferE)&gt;, &interface\_type::getBuffer, &interface\_type::setBuffer&gt; m\_buffer

    - Binary buffer associated with this context binary object.

- class ContextBinaryBuffer : public [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::ApiType&lt;[ContextBinaryBuffer](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt19ContextBinaryBufferE), [QairtContext\_BinaryBufferV1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv429QairtContext_BinaryBufferV1_t)&gt;

    - *#include &lt;QairtContext.hpp&gt;*

[Buffer](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtBuffer.html#classqairt_1_1Buffer) descriptor for a serialized context binary.

Obtained via `Api::make<ContextBinaryBuffer>()`.
    Copy to clipboard

Public Functions

- ContextBinaryBuffer() noexcept = default

    - 

- ContextBinaryBuffer([ContextBinaryBuffer](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt19ContextBinaryBuffer19ContextBinaryBufferERR19ContextBinaryBuffer)&&) noexcept = default

    - 

- [ContextBinaryBuffer](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt19ContextBinaryBufferE) &operator=([ContextBinaryBuffer](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt19ContextBinaryBufferE)&&) noexcept = default

    - 

- inline void \*getData()

    - Get the raw data pointer stored in this buffer.

See also

[QairtContext\_BinaryBuffer\_getData](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextBinary_8h_1a2b7b440a5417416f3d134967a92c7607)

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle.

- Returns

    - Pointer to the underlying buffer memory, or nullptr if none has been set.

- inline const void \*getData() const

    - Get the raw data pointer stored in this buffer.

See also

[QairtContext\_BinaryBuffer\_getData](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextBinary_8h_1a2b7b440a5417416f3d134967a92c7607)

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle.

- Returns

    - Pointer to the underlying buffer memory, or nullptr if none has been set.

- inline void setData(void \*data)

    - Set the raw data pointer for this buffer.

See also

[QairtContext\_BinaryBuffer\_setData](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextBinary_8h_1a74500ec48236014e88af91551b7a79e3)

- Parameters

    - **data** – **[in]** Pointer to the memory region to associate with this buffer.

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle.

- inline uint64\_t getSize() const

    - Get the size of this buffer in bytes.

See also

[QairtContext\_BinaryBuffer\_getSize](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextBinary_8h_1a7999537b273666c012d3ab9df9891846)

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle.

- Returns

    - [Buffer](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtBuffer.html#classqairt_1_1Buffer) size in bytes, or 0 if no size has been set.

- inline void setSize(uint64\_t size) const

    - Set the size of this buffer in bytes.

See also

[QairtContext\_BinaryBuffer\_setSize](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextBinary_8h_1a175531bc5c48205747fd085a749c9cb6)

- Parameters

    - **size** – **[in]** Size in bytes of the memory region referenced by this buffer.

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle.

Private Functions

- inline explicit ContextBinaryBuffer(const std::shared\_ptr&lt;ApiTable&gt; &apiTable)

    -

Private Members

- friend Api

    -

Friends

- *friend class* ::qairt::ApiType

- class ContextConfiguration : public [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::ApiType&lt;[ContextConfiguration](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt20ContextConfigurationE), [QairtContext\_ConfigV1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv423QairtContext_ConfigV1_t)&gt;

    - *#include &lt;QairtContext.hpp&gt;*

Configuration object for context creation and reconfiguration.

Public Functions

- ContextConfiguration() noexcept = default

    - 

- ContextConfiguration([ContextConfiguration](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt20ContextConfiguration20ContextConfigurationERR20ContextConfiguration)&&) noexcept = default

    - 

- [ContextConfiguration](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt20ContextConfigurationE) &operator=([ContextConfiguration](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt20ContextConfigurationE)&&) noexcept = default

    - 

- inline void setPriority([Priority](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtGraph.html#_CPPv4N5qairt8PriorityE) p)

    - Set the scheduling priority for this context configuration.

See also

[QairtContext\_Config\_setPriority](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextConfig_8h_1a6a026ba9565681c70773be2d9d76cfda)

- Parameters

    - **p** – **[in]** Desired execution priority.

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle or invalid argument.

- inline [Priority](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtGraph.html#_CPPv4N5qairt8PriorityE) getPriority() const

    - Get the scheduling priority for this context configuration.

See also

[QairtContext\_Config\_getPriority](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextConfig_8h_1a4aadbe04ecee9e9f1704d4bcd6908f0b)

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle.

- Returns

    - Current execution priority.

- inline std::string &getOemKey()

    - Get the Original Equipment Manufacturer (OEM) key string for this context configuration.

See also

[QairtContext\_Config\_getOemKey](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextConfig_8h_1add50d882b8eb7083b778de59b39a7f7c)

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle.

- Returns

    - Reference to the OEM authentication key string. Empty if not set.

- inline const std::string &getOemKey() const

    - Get the Original Equipment Manufacturer (OEM) key string for this context configuration.

See also

[QairtContext\_Config\_getOemKey](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextConfig_8h_1add50d882b8eb7083b778de59b39a7f7c)

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle.

- Returns

    - Const reference to the OEM authentication key string. Empty if not set.

- inline void setOemKey(std::string &&oemKey)

    - Set the Original Equipment Manufacturer (OEM) key string for this context configuration.

See also

[QairtContext\_Config\_setOemKey](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextConfig_8h_1a59cffc6022e80da24bf4cb2a781641d1)

- Parameters

    - **oemKey** – **[in]** OEM authentication key string to set.

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle.

- inline void getOemKey(const std::string &oemKey)

    - 

- inline void setAsyncExecutionQueueDepth(const [ContextAsyncExecutionQueueDepth](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt31ContextAsyncExecutionQueueDepthE) &aed)

    - Set the asynchronous execution queue depth for this context configuration.

See also

[QairtContext\_Config\_setAsyncQueueDepth](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextConfig_8h_1a081e3c9ee8b8f200d9db22ba0fdd434f)

- Parameters

    - **aed** – **[in]** Async execution queue depth configuration object.

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle.

- inline [ContextAsyncExecutionQueueDepth](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt31ContextAsyncExecutionQueueDepthE) &getAsyncExecutionQueueDepth()

    - Get the asynchronous execution queue depth configuration for this context.

See also

[QairtContext\_Config\_getAsyncQueueDepth](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextConfig_8h_1a00a18a153075987f08301b7bbc65c5bf)

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle.

- Returns

    - Reference to the async execution queue depth object.

- inline const [ContextAsyncExecutionQueueDepth](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt31ContextAsyncExecutionQueueDepthE) &getAsyncExecutionQueueDepth() const

    - Get the asynchronous execution queue depth configuration for this context.

See also

[QairtContext\_Config\_getAsyncQueueDepth](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextConfig_8h_1a00a18a153075987f08301b7bbc65c5bf)

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle.

- Returns

    - Const reference to the async execution queue depth object.

- inline [ContextConfiguration](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt20ContextConfigurationE) &setCustomConfig(const [ContextCustomConfig](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt19ContextCustomConfigE) &config)

    - Set a single backend-specific custom configuration entry on this context configuration.

See also

[QairtContext\_Config\_setCustomConfigs](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextConfig_8h_1a9f0f43bb39c90ddcc27473431e30194a)

- Parameters

    - **config** – **[in]** Backend-specific custom configuration entry to apply.

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle.

- Returns

    - Reference to this configuration object, allowing method chaining.

- inline [ContextConfiguration](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt20ContextConfigurationE) &setCustomConfigs(const [ContextCustomConfiguration](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt26ContextCustomConfigurationE) &config)

    - Set a collection of backend-specific custom configuration entries on this context configuration.

See also

[QairtContext\_Config\_setCustomConfigs](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextConfig_8h_1a9f0f43bb39c90ddcc27473431e30194a)

- Parameters

    - **config** – **[in]** Collection of backend-specific custom configuration entries to apply.

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle.

- Returns

    - Reference to this configuration object, allowing method chaining.

- inline std::vector&lt;std::string&gt; &getEnableGraphs()

    - Get the list of graph names selectively enabled for this context configuration.

See also

[QairtContext\_Config\_getNumEnabledGraphs](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextConfig_8h_1a88f6b67bc80a74fd6041fdf1f0f4c83c)

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle.

- Returns

    - Reference to the vector of enabled graph name strings.

- inline const std::vector&lt;std::string&gt; &getEnableGraphs() const

    - Get the list of graph names selectively enabled for this context configuration.

See also

[QairtContext\_Config\_getNumEnabledGraphs](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextConfig_8h_1a88f6b67bc80a74fd6041fdf1f0f4c83c)

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle.

- Returns

    - Const reference to the vector of enabled graph name strings.

- inline void setEnableGraphs(std::vector&lt;std::string&gt; enabledGraphs)

    - Set the list of graph names selectively enabled for this context configuration.

See also

[QairtContext\_Config\_setEnableGraph](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextConfig_8h_1a7eb2d3f7d288302d4b2881ca9f1b0fba)

- Parameters

    - **enabledGraphs** – **[in]** Names of graphs to enable.

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle.

- inline void setMemoryLimitHint(uint64\_t limit)

    - Set a hint on the maximum memory the backend should use for this context.

This is advisory only; the backend may exceed the limit if required.

See also

[QairtContext\_Config\_setMemoryLimitHint](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextConfig_8h_1a95f08ea2cc52803386742101a23757f7)

- Parameters

    - **limit** – **[in]** Memory limit hint in bytes.

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle or invalid argument.

- inline uint64\_t getMemoryLimitHint() const

    - Get the memory limit hint for this context configuration.

See also

[QairtContext\_Config\_getMemoryLimitHint](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextConfig_8h_1aaf634123660033f68094241efccfdbd1)

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle.

- Returns

    - Memory limit hint in bytes, or 0 if no limit has been set.

- inline void setIsPersistentBinary(bool isPersistentBinary)

    - Set whether the context binary should be treated as persistent.

See also

[QairtContext\_Config\_setIsPersistentBinary](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextConfig_8h_1a7025b58d04466a4d8a107addd8b928f1)

- Parameters

    - **isPersistentBinary** – **[in]** True to enable persistent binary mode; false to disable.

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle or invalid argument.

- inline bool getIsPersistentBinary() const

    - Get whether the context binary is configured as persistent.

See also

[QairtContext\_Config\_getIsPersistentBinary](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextConfig_8h_1a61f2beb6e73af38689722b9ae4f38093)

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle.

- Returns

    - True if persistent binary mode is enabled; false otherwise.

- inline void setBinaryCompatibilityType([ContextBinaryCompatibilityType](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt30ContextBinaryCompatibilityTypeE) bct)

    - Set the binary compatibility policy for loading cached context binaries.

See also

[QairtContext\_Config\_setBinaryCompatibilityType](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextConfig_8h_1a28e0ae248e789b7bb4af4b94cfb25a9d)

- Parameters

    - **bct** – **[in]** Binary compatibility policy to enforce.

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle or invalid argument.

- inline [ContextBinaryCompatibilityType](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt30ContextBinaryCompatibilityTypeE) getBinaryCompatibilityType() const

    - Get the binary compatibility policy for loading cached context binaries.

See also

[QairtContext\_Config\_getBinaryCompatibilityType](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContextConfig_8h_1a6f8d426243ebae7a84f69443dbfcf4ec)

- Throws

    - [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::[Exception](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtApi.html#_CPPv4N5qairt9ExceptionE) – on invalid handle.

- Returns

    - Current binary compatibility policy.

Private Functions

- inline void prepareToCross() const

    - 

- inline void updateAfterCross() const

    - 

- inline explicit ContextConfiguration(const std::shared\_ptr&lt;ApiTable&gt; &apiTable)

    -

Private Members

- friend Api

    - 

- [detail](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtTypeTraits.html#_CPPv4N5qairt6detailE)::crossable&lt;std::string, &interface\_type::getOemKey, &interface\_type::setOemKey&gt; m\_oemKey

    - Original Equipment Manufacturer (OEM) key string for backend authentication.

- [detail](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtTypeTraits.html#_CPPv4N5qairt6detailE)::crossable&lt;[detail](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtTypeTraits.html#_CPPv4N5qairt6detailE)::non\_owning&lt;[ContextAsyncExecutionQueueDepth](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt31ContextAsyncExecutionQueueDepthE)&gt;, &interface\_type::getAsyncQueueDepth, &interface\_type::setAsyncQueueDepth&gt; m\_depth

    - Maximum number of outstanding asynchronous execution requests.

- mutable std::vector&lt;std::string&gt; m\_enabledGraphs

    - Names of graphs selectively enabled for this context configuration.

- class ContextCustomConfig : public [qairt](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtLog.html#_CPPv45qairt)::CustomConfigType

    - *#include &lt;QairtContext.hpp&gt;*

Abstract base class for a single backend-specific context custom configuration entry.

Public Functions

- virtual ~ContextCustomConfig() = default

    - 

- virtual [QairtContext\_CustomConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv433QairtContext_CustomConfigHandle_t) getCustomConfigHandle() const = 0

    -

Protected Functions

- ContextCustomConfig() = default

    - 

- ContextCustomConfig(const [ContextCustomConfig](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt19ContextCustomConfig19ContextCustomConfigERK19ContextCustomConfig)&) = default

    - 

- ContextCustomConfig([ContextCustomConfig](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt19ContextCustomConfig19ContextCustomConfigERR19ContextCustomConfig)&&) noexcept = default

    - 

- [ContextCustomConfig](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt19ContextCustomConfigE) &operator=(const [ContextCustomConfig](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt19ContextCustomConfigE)&) = default

    - 

- [ContextCustomConfig](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt19ContextCustomConfigE) &operator=([ContextCustomConfig](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt19ContextCustomConfigE)&&) noexcept = default

    -

- class ContextCustomConfiguration

    - *#include &lt;QairtContext.hpp&gt;*

Abstract base class for a collection of backend-specific context custom configuration entries.

Public Functions

- virtual ~ContextCustomConfiguration() = default

    - 

- virtual std::vector&lt;[QairtContext\_CustomConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#_CPPv433QairtContext_CustomConfigHandle_t)&gt; getCustomConfigs() const = 0

    -

Protected Functions

- ContextCustomConfiguration() = default

    - 

- ContextCustomConfiguration(const [ContextCustomConfiguration](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt26ContextCustomConfiguration26ContextCustomConfigurationERK26ContextCustomConfiguration)&) = default

    - 

- ContextCustomConfiguration([ContextCustomConfiguration](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt26ContextCustomConfiguration26ContextCustomConfigurationERR26ContextCustomConfiguration)&&) noexcept = default

    - 

- [ContextCustomConfiguration](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt26ContextCustomConfigurationE) &operator=(const [ContextCustomConfiguration](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt26ContextCustomConfigurationE)&) = default

    - 

- [ContextCustomConfiguration](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt26ContextCustomConfigurationE) &operator=([ContextCustomConfiguration](https://docs.qualcomm.com/doc/80-63442-10/topic/cpp-api_QairtContext.html#_CPPv4N5qairt26ContextCustomConfigurationE)&&) noexcept = default

    -

Last Published: Jun 04, 2026

[Previous Topic
QairtApi](https://docs.qualcomm.com/bundle/publicresource/80-63442-10/topics/QairtApi.md) [Next Topic
QairtGraph](https://docs.qualcomm.com/bundle/publicresource/80-63442-10/topics/cpp-api_QairtGraph.md)