Commit 6e51e8b2 by xuchen

add the annotation and modify the indent

parent b8d2319d
......@@ -341,7 +341,6 @@ void MatrixMul(const XTensor &a, MATRIX_TRANS_TYPE transposedA,
/* destroy variables */
delete[] dimSize;
}
/* call _MatrixMul function */
......
......@@ -260,7 +260,7 @@ void _MatrixMulBatchedCPU(const TensorList * a, MATRIX_TRANS_TYPE transposedA,
CheckNTErrors((bi->order == 2), "2d tensor (i.e., matrix) is required!");
CheckNTErrors((ci->order == 2), "2d tensor (i.e., matrix) is required!");
#ifdef USE_BLAS
_MatrixMULCPU(ai, transposedA, bi, transposedB, ci, alpha, beta);
_MatrixMULCPU(ai, transposedA, bi, transposedB, ci, alpha, beta);
#else
_MatrixMul2D(ai, transposedA, bi, transposedB, ci, alpha, beta);
#endif
......
......@@ -127,6 +127,14 @@ XTensor ConvertDataType(const XTensor & input, TENSOR_DATA_TYPE dataType)
return output;
}
/*
convert data type (return an XTensor structure)
make a new tensor to keep the result and return it
>> input - the input tensor
>> output - the output tensor
<< return - the output tensor with the specified data type
*/
void ConvertDataType(const XTensor & input, XTensor & output, TENSOR_DATA_TYPE dataType)
{
if (!output.isInit || input.dataType != output.dataType) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论