Skip to content

Function tensor_from_container

function tensor_from_container(Container) base

template <has_data_size Container, typename T = typename Container::value_type>
KFR_INTRINSIC tensor<T, 1> tensor_from_container(Container container)

Creates a 1D tensor referencing the data of a container. The container is moved into a memory finalizer so the data remains valid for the tensor's lifetime.

Template parameters
Container container type with data() and size() methods.
T element type deduced from the container.
Parameters
container container to reference.
Returns
1D tensor referencing the container's data.

Fully qualified name: kfr::tensor_from_container(Container)

Declared at base/tensor.hpp:1250

This file was generated by cxxdox, a C++ documentation generator based on MkDocs Material and libclang.