XVector
xvec_context.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2026 XCENA Inc.
3 
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7 
8  http://www.apache.org/licenses/LICENSE-2.0
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 */
16 
26 #pragma once
27 
28 #include "xvec_types.h"
29 
30 #ifdef __cplusplus
31 extern "C"
32 {
33 #endif
34 
35  // =============================================================================
36  // Device Information Functions
37  // =============================================================================
38 
52  xvecStatus xvecGetNumDevices(uint32_t* outNumDevices);
53 
54  // =============================================================================
55  // Context Lifecycle Functions
56  // =============================================================================
57 
78  xvecStatus xvecCreateContext(xvecExecutionContextTag** outContext, uint32_t deviceId);
79 
98  xvecStatus xvecDestroyContext(xvecExecutionContextTag* context);
99 
143  xvecStatus xvecSetContextProperty(xvecExecutionContextTag* context, const char* key, const char* value);
144 
169  xvecStatus xvecGetContextProperty(xvecExecutionContextTag* context, const char* key, char* value, size_t valueSize, size_t* outRequiredSize);
170 
171  // =============================================================================
172  // VPE Management Functions
173  // =============================================================================
174 
208  xvecStatus xvecResetVpeContext(xvecExecutionContextTag* context);
209 
210 #ifdef __cplusplus
211 }
212 #endif
xvecStatus xvecDestroyContext(xvecExecutionContextTag *context)
Release a context.
xvecStatus xvecGetContextProperty(xvecExecutionContextTag *context, const char *key, char *value, size_t valueSize, size_t *outRequiredSize)
Get a property from the execution context.
xvecStatus xvecResetVpeContext(xvecExecutionContextTag *context)
Reset the VPE (Vector Process Engine) SRAM allocator state.
xvecStatus xvecCreateContext(xvecExecutionContextTag **outContext, uint32_t deviceId)
Create an execution context.
xvecStatus xvecSetContextProperty(xvecExecutionContextTag *context, const char *key, const char *value)
Set a property on the execution context.
xvecStatus xvecGetNumDevices(uint32_t *outNumDevices)
Get the number of available devices.
Core types, enums, and structures for the XVector library.
xvecStatus
Status codes returned by XVector API functions.
Definition: xvec_types.h:133