vt::asvector#

template<typename T, size_t N>
std::vector<T> vt::asvector(const Tensor<T, N> &tensor)#

Copy the tensor from device to host (std::vector).

Template Parameters:
  • T – Data type of the tensor.

  • N – Number of dimensions of the tensor.

Parameters:

tensor – The tensor object.

Returns:

std::vector<T>: The std::vector from the tensor.