|
XVector
|
Buffer management for the XVector library. More...
#include "xvec_types.h"Go to the source code of this file.
Functions | |
| xvecStatus | xvecCreateBuffer (xvecExecutionContextTag *context, size_t size, xvecBufferTag **outBuffer) |
| Create a buffer. More... | |
| xvecStatus | xvecDestroyBuffer (xvecExecutionContextTag *context, xvecBufferTag *buffer) |
| Destroy a buffer. More... | |
| xvecStatus | xvecGetBufferData (xvecBufferTag *buffer, void **outData) |
| Get the data pointer of the buffer. More... | |
| xvecStatus | xvecGetBufferSize (xvecBufferTag *buffer, size_t *outSize) |
| Get the size of the buffer. More... | |
| xvecStatus | xvecGetBufferSlice (xvecBufferTag *buffer, xvecBufferSlice *outSlice) |
| Get both data pointer and size of the buffer as a slice. More... | |
Buffer management for the XVector library.
This header provides the API for creating, accessing, and destroying buffers. Buffers are used to store vector data, query vectors, and search results that can be efficiently transferred to/from device memory.
Definition in file xvec_buffer.h.
| xvecStatus xvecCreateBuffer | ( | xvecExecutionContextTag * | context, |
| size_t | size, | ||
| xvecBufferTag ** | outBuffer | ||
| ) |
Create a buffer.
| [in] | context | Execution context |
| [in] | size | Size of the buffer to be created |
| [out] | outBuffer | Output pointer that receives that allocated buffer address. |
| xvecStatus xvecDestroyBuffer | ( | xvecExecutionContextTag * | context, |
| xvecBufferTag * | buffer | ||
| ) |
Destroy a buffer.
Releases the buffer immediately and frees associated resources.
| [in] | context | Execution context |
| [in] | buffer | Pointer previously returned by xvecCreateBuffer |
| xvecStatus xvecGetBufferData | ( | xvecBufferTag * | buffer, |
| void ** | outData | ||
| ) |
Get the data pointer of the buffer.
| [in] | buffer | Pointer to the buffer |
| [out] | outData | Output pointer that receives the data pointer of the buffer. |
| xvecStatus xvecGetBufferSize | ( | xvecBufferTag * | buffer, |
| size_t * | outSize | ||
| ) |
Get the size of the buffer.
| [in] | buffer | Pointer to the buffer |
| [out] | outSize | Output pointer that receives the size of the buffer. |
| xvecStatus xvecGetBufferSlice | ( | xvecBufferTag * | buffer, |
| xvecBufferSlice * | outSlice | ||
| ) |
Get both data pointer and size of the buffer as a slice.
| [in] | buffer | Pointer to the buffer |
| [out] | outSlice | Output pointer to an xvecBufferSlice structure to populate. |