table of contents
BSON_VECTOR_FLOAT32_VIEW_T(3) | libbson | BSON_VECTOR_FLOAT32_VIEW_T(3) |
A reference to mutable non-owned BSON Binary data holding a valid Vector of float32 element type.
SYNOPSIS¶
#include <bson/bson.h> typedef struct bson_vector_float32_view_t {
/*< private >*/ } bson_vector_float32_view_t;
DESCRIPTION¶
bson_vector_float32_view_t is a structure that acts as an opaque reference to a block of memory that has been validated as a float32 vector.
It is meant to be passed by value and can be discarded at any time. The contents of the structure should be considered private.
The bson_t MUST be valid for the lifetime of the view and it is an error to modify the bson_t while using the view.
EXAMPLE¶
static const float values[] = {1.0f, 2.0f, 3.0f}; const size_t values_count = sizeof values / sizeof values[0]; bson_vector_float32_view_t view; BSON_ASSERT (BSON_APPEND_VECTOR_FLOAT32_UNINIT (&doc, "vector", values_count, &view)); BSON_ASSERT (bson_vector_float32_view_write (view, values, values_count, 0));
SEE ALSO:
bson_append_vector_float32_uninit() bson_vector_float32_const_view_t
AUTHOR¶
MongoDB, Inc
COPYRIGHT¶
2009-present, MongoDB, Inc.
October 8, 2025 | 2.1.2 |