Commit d8bd1ef2 by xiaotong

new interfaces of CopyIndexed

parent 7c44bfd2
...@@ -29,12 +29,21 @@ namespace nts { // namespace nts(NiuTrans.Tensor) ...@@ -29,12 +29,21 @@ namespace nts { // namespace nts(NiuTrans.Tensor)
/* copy selected sub-tensors */ /* copy selected sub-tensors */
void _CopyIndexed(const XTensor * s, XTensor * t, int dim, int * srcIndex, int indexSize, int * tgtIndex, int copyNum); void _CopyIndexed(const XTensor * s, XTensor * t, int dim, int * srcIndex, int indexSize, int * tgtIndex, int copyNum);
/* copy selected sub-tensors where indeces are kept in tensors */
void _CopyIndexed(const XTensor * s, XTensor * t, int dim, const XTensor * srcIndex, const XTensor * tgtIndex);
/* /*
copy selected sub-tensors (return a XTensor structure) copy selected sub-tensors (return a XTensor structure)
make a new tensor to keep the result and return it make a new tensor to keep the result and return it (remove this???)
*/ */
XTensor CopyIndexed(const XTensor &s, int dim, int * srcIndex, int indexSize, int * tgtIndex, int copyNum); XTensor CopyIndexed(const XTensor &s, int dim, int * srcIndex, int indexSize, int * tgtIndex, int copyNum);
/*
copy selected sub-tensors where indeces are kept in tensors (return a XTensor structure)
make a new tensor to keep the result and return it (remove this???)
*/
void CopyIndexed(const XTensor * s, XTensor * t, int dim, const XTensor * srcIndex, const XTensor * tgtIndex);
} // namespace nts(NiuTrans.Tensor) } // namespace nts(NiuTrans.Tensor)
#endif // __COPYINDEXED_H__ #endif // __COPYINDEXED_H__
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论