Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
NiuTrans.Tensor
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
Emmay
NiuTrans.Tensor
Commits
a6956305
Commit
a6956305
authored
Jul 19, 2018
by
xiaotong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove \"extern "c"\"
parent
7cc3e89d
显示空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
0 行增加
和
18 行删除
+0
-18
source/tensor/core/arithmetic/SumByColumnTV.h
+0
-1
source/tensor/core/arithmetic/SumByColumnVT.h
+0
-1
source/tensor/core/getandset/Select.h
+0
-2
source/tensor/core/math/Normalize.h
+0
-2
source/tensor/core/movement/CopyBlocksInGrid.h
+0
-1
source/tensor/core/movement/CopyData2D.h
+0
-1
source/tensor/core/movement/CopyInGrid.h
+0
-1
source/tensor/core/movement/CopyValues.h
+0
-1
source/tensor/core/reduce/ReduceMax.h
+0
-1
source/tensor/core/reduce/ReduceMean.h
+0
-1
source/tensor/core/reduce/ReduceSum.h
+0
-1
source/tensor/core/reduce/ReduceSumSquared.h
+0
-1
source/tensor/core/reduce/ReduceVariance.h
+0
-1
source/tensor/core/shape/Unsqueeze.h
+0
-1
source/tensor/core/sort/TopK.h
+0
-2
没有找到文件。
source/tensor/core/arithmetic/SumByColumnTV.h
查看文件 @
a6956305
...
...
@@ -27,7 +27,6 @@
namespace
nts
{
// namespace nts(NiuTrans.Tensor)
/* sum of a tensor and a (column) vector */
extern
"C"
void
_SumByColumnTV
(
const
XTensor
*
a
,
const
XTensor
*
b
,
XTensor
*
c
=
NULL
,
DTYPE
beta
=
(
DTYPE
)
1
.
0
);
}
// namespace nts(NiuTrans.Tensor)
...
...
source/tensor/core/arithmetic/SumByColumnVT.h
查看文件 @
a6956305
...
...
@@ -27,7 +27,6 @@
namespace
nts
{
// namespace nts(NiuTrans.Tensor)
/* sum of a (column) vector and a tensor */
extern
"C"
void
_SumByColumnVT
(
const
XTensor
*
a
,
const
XTensor
*
b
,
XTensor
*
c
=
NULL
,
DTYPE
beta
=
(
DTYPE
)
1
.
0
);
}
// namespace nts(NiuTrans.Tensor)
...
...
source/tensor/core/getandset/Select.h
查看文件 @
a6956305
...
...
@@ -27,7 +27,6 @@
namespace
nts
{
// namespace nts(NiuTrans.Tensor)
/* generate a tensor with selected data c = select(a) */
extern
"C"
void
_Select
(
const
XTensor
*
a
,
XTensor
*
c
,
XTensor
*
indexCPU
);
/*
...
...
@@ -40,7 +39,6 @@ XTensor Select(const XTensor &a, XTensor &indexCPU);
generate a tensor with selected data in range[low,high] along the given dimension
c = select(a)
*/
extern
"C"
void
_SelectRange
(
const
XTensor
*
a
,
XTensor
*
c
,
int
dim
,
int
low
,
int
high
);
/*
...
...
source/tensor/core/math/Normalize.h
查看文件 @
a6956305
...
...
@@ -31,7 +31,6 @@ normalized the data with normal distribution.
For an input x, y = a * (x-mean)/sqrt(variance+\epsilon) + b
where a and b are the scalar and bias respectively, and \epsilon is the adjustment parameter.
*/
extern
"C"
void
_Normalize
(
const
XTensor
*
input
,
XTensor
*
output
,
int
dim
,
const
XTensor
*
mean
,
const
XTensor
*
var
,
const
XTensor
*
a
,
const
XTensor
*
b
,
DTYPE
epsilon
);
/*
...
...
@@ -40,7 +39,6 @@ keep the result in the input tenosr and return nothing
For an input x, x = a * (x-mean)/sqrt(variance+\epsilon) + b
where a and b are the scalar and bias respectively, and \epsilon is the adjustment parameter.
*/
extern
"C"
void
_NormalizeMe
(
XTensor
*
input
,
int
dim
,
const
XTensor
*
mean
,
const
XTensor
*
var
,
const
XTensor
*
a
,
const
XTensor
*
b
,
DTYPE
epsilon
);
/*
...
...
source/tensor/core/movement/CopyBlocksInGrid.h
查看文件 @
a6956305
...
...
@@ -27,7 +27,6 @@
namespace
nts
{
// namespace nts(NiuTrans.Tensor)
/* copy a number of blocks in grid */
extern
"C"
void
_CopyBlocksInGrid
(
void
*
source
,
int
blockSize
,
int
blockNum
,
int
gridNum
,
void
*
target
,
int
*
index
,
int
unitSize
,
bool
isIndexOnDev
,
XMem
*
myMem
);
}
// namespace nts(NiuTrans.Tensor)
...
...
source/tensor/core/movement/CopyData2D.h
查看文件 @
a6956305
...
...
@@ -27,7 +27,6 @@
namespace
nts
{
// namespace nts(NiuTrans.Tensor)
/* copy data blocks by 2d layout */
extern
"C"
void
_CopyData2D
(
void
**
s
,
int
sPitch
,
void
**
t
,
int
tPitch
,
int
count
,
int
mSize
,
int
n
,
XMem
*
myMem
);
}
// namespace nts(NiuTrans.Tensor)
...
...
source/tensor/core/movement/CopyInGrid.h
查看文件 @
a6956305
...
...
@@ -27,7 +27,6 @@
namespace
nts
{
// namespace nts(NiuTrans.Tensor)
/* copy a number of blocks in grid. i.e., reorder the data blocks in the same memory piece*/
extern
"C"
void
_CopyInGrid
(
const
XTensor
*
s
,
XTensor
*
t
,
int
*
index
,
int
blockDim
,
int
blockNumInGrid
,
bool
isIndexOnDev
=
false
);
}
// namespace nts(NiuTrans.Tensor)
...
...
source/tensor/core/movement/CopyValues.h
查看文件 @
a6956305
...
...
@@ -27,7 +27,6 @@
namespace
nts
{
// namespace nts(NiuTrans.Tensor)
/* copy s to t */
extern
"C"
void
_CopyValues
(
const
XTensor
*
s
,
XTensor
*
t
,
XStream
*
stream
=
NULL
);
/*
...
...
source/tensor/core/reduce/ReduceMax.h
查看文件 @
a6956305
...
...
@@ -27,7 +27,6 @@
namespace
nts
{
// namespace nts(NiuTrans.Tensor)
/* get the max value of the items along a dimension of the tensor. */
extern
"C"
void
_ReduceMax
(
const
XTensor
*
input
,
XTensor
*
output
,
int
dim
);
/*
...
...
source/tensor/core/reduce/ReduceMean.h
查看文件 @
a6956305
...
...
@@ -30,7 +30,6 @@ namespace nts{ // namespace nts(NiuTrans.Tensor)
get the mean value along a dimension of the tensor
For a 1-dimensional data array a, mean = (1/n) * sum_i input_i
*/
extern
"C"
void
_ReduceMean
(
const
XTensor
*
input
,
XTensor
*
output
,
int
dim
);
/*
...
...
source/tensor/core/reduce/ReduceSum.h
查看文件 @
a6956305
...
...
@@ -32,7 +32,6 @@ For a 1-dimensional data array a,
sum = \sum_i (a_i - shift) if isExp == false
sum = \sum_i exp(a_i - shift) if isExp == true
*/
extern
"C"
void
_ReduceSum
(
const
XTensor
*
input
,
XTensor
*
output
,
int
dim
,
const
XTensor
*
shift
=
NULL
,
DTYPE
power
=
(
DTYPE
)
1
.
0
F
,
bool
isExp
=
false
);
...
...
source/tensor/core/reduce/ReduceSumSquared.h
查看文件 @
a6956305
...
...
@@ -31,7 +31,6 @@ squared sum of the items along a dimension of the tensor
For a 1-dimensional data array a,
sum = \sum_i (a_i - shift)^2
*/
extern
"C"
void
_ReduceSumSquared
(
const
XTensor
*
input
,
XTensor
*
output
,
int
dim
,
const
XTensor
*
shift
);
/*
...
...
source/tensor/core/reduce/ReduceVariance.h
查看文件 @
a6956305
...
...
@@ -30,7 +30,6 @@ namespace nts{ // namespace nts(NiuTrans.Tensor)
variance of the items along a dimension of the tensor
For a 1-dimensional data array a, variance = 1/n * \sum_i (a_i - mean)^2
*/
extern
"C"
void
_ReduceVariance
(
const
XTensor
*
input
,
XTensor
*
output
,
int
dim
,
const
XTensor
*
mean
);
/*
...
...
source/tensor/core/shape/Unsqueeze.h
查看文件 @
a6956305
...
...
@@ -27,7 +27,6 @@
namespace
nts
{
// namespace nts(NiuTrans.Tensor)
/* insert a dimension by copying the blocks for x times (where x is the size of the inerted dimension) */
extern
"C"
void
_Unsqueeze
(
const
XTensor
*
a
,
XTensor
*
b
,
int
dim
,
int
dSize
);
/*
...
...
source/tensor/core/sort/TopK.h
查看文件 @
a6956305
...
...
@@ -27,11 +27,9 @@
namespace
nts
{
// namespace nts(NiuTrans.Tensor)
/* get the top-k items along a given dimension */
extern
"C"
void
_TopK
(
const
XTensor
*
a
,
XTensor
*
b
,
XTensor
*
index
,
int
dim
,
int
k
);
/* get the top-k items along a given dimension */
extern
"C"
void
TopK
(
XTensor
&
a
,
XTensor
&
b
,
XTensor
&
index
,
int
dim
,
int
k
);
}
// namespace nts(NiuTrans.Tensor)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论