Skip to content

Vector


lockfree_ring_buffer class

template <typename T> lockfree_ring_buffer

Single producer single consumer lock-free ring buffer


make_univector function

template <typename T>
univector_ref<T> make_univector(T *data, size_t size)

Creates univector from data and size


template <typename T>
univector_ref<const T> make_univector(const T *data,
                                      size_t size)

Creates univector from data and size


template <typename Container,
          KFR_ENABLE_IF(kfr::has_data_size<Container>),
          typename T = value_type_of<Container>>
univector_ref<const T>
make_univector(const Container &container)

Creates univector from a container (must have data() and size() methods)


template <typename Container,
          KFR_ENABLE_IF(kfr::has_data_size<Container>),
          typename T = value_type_of<Container>>
univector_ref<T> make_univector(Container &container)

Creates univector from a container (must have data() and size() methods)


template <typename T, size_t N>
univector_ref<T> make_univector(T (&arr)[N])

Creates univector from a sized array


template <typename T, size_t N>
univector_ref<const T> make_univector(const T (&arr)[N])

Creates univector from a sized array


render function

template <typename Expr,
          typename T = expression_value_type<Expr>>
univector<T> render(Expr &&expr)

Converts an expression to univector


template <typename Expr,
          typename T = expression_value_type<Expr>>
univector<T> render(Expr &&expr, size_t size,
                    size_t offset = 0)

Converts an expression to univector


template <typename Expr, size_t Size,
          typename T = expression_value_type<Expr>>
univector<T, Size> render(Expr &&expr, csize_t<Size>)

Converts an expression to univector


slice function

univector<T, 0> slice(size_t start = 0,
                      size_t size = max_size_t)

Returns subrange of the vector. If start is greater or equal to this->size, returns empty univector If requested size is greater than this->size, returns only available elements


univector<const T, 0> slice(size_t start = 0,
                            size_t size = max_size_t) const

Returns subrange of the vector. If start is greater or equal to this->size, returns empty univector If requested size is greater than this->size, returns only available elements


truncate function

univector<T, 0> truncate(size_t size = max_size_t)

Returns subrange of the vector starting from 0. If requested size is greater than this->size, returns only available elements


univector<const T, 0>
truncate(size_t size = max_size_t) const

Returns subrange of the vector starting from 0. If requested size is greater than this->size, returns only available elements


univector class

template <typename T,
          univector_tag Tag = tag_dynamic_vector>
univector

Class that represent data in KFR. Many KFR functions can take this class as an argument. Can inherit from std::vector, std::array or keep only reference to data and its size.

univector<float> is inherited from std::vector<float> univector<float, 10> is inherited from std::array<float, 10> univector<float, 0> contains only reference to data

To convert a plain pointer to univector, call make_univector:

double* buffer;
size_t size;
univector<double, 0\> v = make_univector(buffer, size);
// or pass result vector directly to a function:
some_function(make_univector(buffer, size));


template <typename T, size_t Size> univector

Class that represent data in KFR. Many KFR functions can take this class as an argument. Can inherit from std::vector, std::array or keep only reference to data and its size.

univector<float> is inherited from std::vector<float> univector<float, 10> is inherited from std::array<float, 10> univector<float, 0> contains only reference to data

To convert a plain pointer to univector, call make_univector:

double* buffer;
size_t size;
univector<double, 0\> v = make_univector(buffer, size);
// or pass result vector directly to a function:
some_function(make_univector(buffer, size));


univector_base class

template <typename T, typename Class, bool is_expression>
univector_base

Base class for all univector specializations.


univector_dyn typedef

template <typename T>
univector_dyn = univector<T, tag_dynamic_vector>

Alias for univector<T, tag_dynamic_vector\>;


univector_dyn = univector<T, tag_dynamic_vector>

Alias for univector<T, tag_dynamic_vector\>;


univector_ref typedef

template <typename T>
univector_ref = univector<T, tag_array_ref>

Alias for univector<T, tag_array_ref\>;


univector_ref = univector<T, tag_array_ref>

Alias for univector<T, tag_array_ref\>;


Auto-generated from sources, Revision 5191a48df06ea47104ca67db19fa82058d09c20a, https://github.com/kfrlib/kfr/blob/5191a48df06ea47104ca67db19fa82058d09c20a/include/kfr/