Conversation
| // as numbers | ||
|
|
||
| template<typename T> | ||
| std::string operator+(const T& val) { |
| } | ||
|
|
||
| template<> | ||
| std::string operator+(const af::cfloat& val) { |
|
|
||
| template<> | ||
| std::string operator+(const af::cdouble& val) { | ||
| std::ostringstream os; |
| std::ostringstream tmpOs; | ||
|
|
||
| uint dim0 = dim0Start + i; | ||
| if (dim0 == coords[0]) |
| std::vector<int> valsWidths; | ||
| std::vector<std::string> ctxDim0; | ||
| std::vector<std::string> ctxOutVals; | ||
| std::vector<std::string> ctxGoldVals; |
|
|
||
| int maxWidth = std::max<int>(dim0Len, outLen); | ||
| maxWidth = std::max<int>(maxWidth, goldLen); | ||
| valsWidths.push_back(maxWidth); |
|
|
||
| // Display dim0 positions | ||
| // Display dim0 positions, output values, and reference values | ||
|
|
| } else | ||
| os << std::setw(valsWidth) << std::left << i << " "; | ||
| for (uint i = 0; i < (dim0End - dim0Start); ++i) { | ||
| os << std::setw(valsWidths[i]) << std::left << ctxDim0[i] |
|
|
||
| // Get dim0 positions and out/reference values for the context window | ||
| // Also get the max string length between the position and out/ref values | ||
| // per item so that it can be used later as the field width for |