Commit f8376440 by xiaotong

functions for float-typed data

parent fbea5c70
...@@ -27,24 +27,25 @@ ...@@ -27,24 +27,25 @@
namespace nts { // namespace nts(NiuTrans.Tensor) namespace nts { // namespace nts(NiuTrans.Tensor)
/* /*
scale all tensor entires scale up tensor entires
b = a * scale b = a * scale
*/ */
void _Scale(const XTensor * a, XTensor * b, int scale); void _Scale(const XTensor * a, XTensor * b, int scale);
void _Scale(const XTensor * a, XTensor * b, float scale);
/* /*
scale tensor entires (on site) scale up tensor entires (on site)
b = a * scale b = a * scale
*/ */
void Scale(XTensor & a, int scale); void Scale(XTensor & a, int scale);
void Scale(XTensor & a, float scale);
/* /*
scale tensor entires scale up tensor entires
b = a * scale b = a * scale
*/ */
void Scale(const XTensor & a, XTensor &b, int scale); void Scale(const XTensor & a, XTensor &b, int scale);
void Scale(const XTensor & a, XTensor &b, float scale);
//void Scale(const XTensor & a, XTensor & b, int num);
/* /*
descale tensor entires descale tensor entires
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论