Template Function helpme::stringify

Function Documentation

template<typename T>
std::string helpme::stringify(T *data, size_t size, size_t rowDim, int width = 14, int precision = 8)

makes a string representation of a multdimensional tensor, stored in a flat array.

Parameters:
  • data – pointer to the start of the array holding the tensor information.

  • size – the length of the array holding the tensor information.

  • rowDim – the dimension of the fastest running index.

  • width – the width of each individual floating point number.

  • precision – used to display each floating point number.

Returns:

the string representation of the tensor.