Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
6a1b2ee2
Commit
6a1b2ee2
authored
Mar 13, 2018
by
Robert Kimball
Committed by
Scott Cyphers
Mar 13, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make stuff const (#625)
parent
64a105db
Hide whitespace changes
Inline
Side-by-side
Showing
58 changed files
with
83 additions
and
80 deletions
+83
-80
int_call_frame.hpp
src/ngraph/runtime/interpreter/int_call_frame.hpp
+1
-1
abs.hpp
src/ngraph/runtime/kernel/abs.hpp
+1
-1
acos.hpp
src/ngraph/runtime/kernel/acos.hpp
+1
-1
add.hpp
src/ngraph/runtime/kernel/add.hpp
+1
-1
allreduce.hpp
src/ngraph/runtime/kernel/allreduce.hpp
+1
-1
asin.hpp
src/ngraph/runtime/kernel/asin.hpp
+1
-1
atan.hpp
src/ngraph/runtime/kernel/atan.hpp
+1
-1
avg_pool.hpp
src/ngraph/runtime/kernel/avg_pool.hpp
+2
-2
broadcast.hpp
src/ngraph/runtime/kernel/broadcast.hpp
+1
-1
ceiling.hpp
src/ngraph/runtime/kernel/ceiling.hpp
+1
-1
concat.hpp
src/ngraph/runtime/kernel/concat.hpp
+1
-1
convert.hpp
src/ngraph/runtime/kernel/convert.hpp
+1
-1
convolution.hpp
src/ngraph/runtime/kernel/convolution.hpp
+2
-2
copy.hpp
src/ngraph/runtime/kernel/copy.hpp
+1
-1
cos.hpp
src/ngraph/runtime/kernel/cos.hpp
+1
-1
cosh.hpp
src/ngraph/runtime/kernel/cosh.hpp
+1
-1
divide.hpp
src/ngraph/runtime/kernel/divide.hpp
+2
-2
dot.hpp
src/ngraph/runtime/kernel/dot.hpp
+2
-2
equal.hpp
src/ngraph/runtime/kernel/equal.hpp
+2
-2
exp.hpp
src/ngraph/runtime/kernel/exp.hpp
+1
-1
floor.hpp
src/ngraph/runtime/kernel/floor.hpp
+1
-1
greater.hpp
src/ngraph/runtime/kernel/greater.hpp
+2
-2
greater_eq.hpp
src/ngraph/runtime/kernel/greater_eq.hpp
+2
-2
less.hpp
src/ngraph/runtime/kernel/less.hpp
+2
-2
less_eq.hpp
src/ngraph/runtime/kernel/less_eq.hpp
+2
-2
log.hpp
src/ngraph/runtime/kernel/log.hpp
+1
-1
max.hpp
src/ngraph/runtime/kernel/max.hpp
+1
-1
max_pool.hpp
src/ngraph/runtime/kernel/max_pool.hpp
+3
-3
maximum.hpp
src/ngraph/runtime/kernel/maximum.hpp
+1
-1
min.hpp
src/ngraph/runtime/kernel/min.hpp
+1
-1
minimum.hpp
src/ngraph/runtime/kernel/minimum.hpp
+1
-1
multiply.hpp
src/ngraph/runtime/kernel/multiply.hpp
+1
-1
negate.hpp
src/ngraph/runtime/kernel/negate.hpp
+1
-1
not.hpp
src/ngraph/runtime/kernel/not.hpp
+1
-1
not_equal.hpp
src/ngraph/runtime/kernel/not_equal.hpp
+2
-2
one_hot.hpp
src/ngraph/runtime/kernel/one_hot.hpp
+5
-2
pad.hpp
src/ngraph/runtime/kernel/pad.hpp
+2
-2
power.hpp
src/ngraph/runtime/kernel/power.hpp
+1
-1
product.hpp
src/ngraph/runtime/kernel/product.hpp
+1
-1
reduce.hpp
src/ngraph/runtime/kernel/reduce.hpp
+2
-2
reduce_window.hpp
src/ngraph/runtime/kernel/reduce_window.hpp
+2
-2
relu.hpp
src/ngraph/runtime/kernel/relu.hpp
+2
-2
replace_slice.hpp
src/ngraph/runtime/kernel/replace_slice.hpp
+2
-2
reshape.hpp
src/ngraph/runtime/kernel/reshape.hpp
+1
-1
result.hpp
src/ngraph/runtime/kernel/result.hpp
+1
-1
reverse.hpp
src/ngraph/runtime/kernel/reverse.hpp
+1
-1
select.hpp
src/ngraph/runtime/kernel/select.hpp
+3
-3
select_and_scatter.hpp
src/ngraph/runtime/kernel/select_and_scatter.hpp
+3
-3
sign.hpp
src/ngraph/runtime/kernel/sign.hpp
+1
-1
sin.hpp
src/ngraph/runtime/kernel/sin.hpp
+1
-1
sinh.hpp
src/ngraph/runtime/kernel/sinh.hpp
+1
-1
slice.hpp
src/ngraph/runtime/kernel/slice.hpp
+1
-1
softmax.hpp
src/ngraph/runtime/kernel/softmax.hpp
+1
-1
sqrt.hpp
src/ngraph/runtime/kernel/sqrt.hpp
+1
-1
subtract.hpp
src/ngraph/runtime/kernel/subtract.hpp
+1
-1
sum.hpp
src/ngraph/runtime/kernel/sum.hpp
+1
-1
tan.hpp
src/ngraph/runtime/kernel/tan.hpp
+1
-1
tanh.hpp
src/ngraph/runtime/kernel/tanh.hpp
+1
-1
No files found.
src/ngraph/runtime/interpreter/int_call_frame.hpp
View file @
6a1b2ee2
...
...
@@ -319,7 +319,7 @@ private:
else
if
(
node_op
==
"Concat"
)
{
const
op
::
Concat
*
concat
=
static_cast
<
const
op
::
Concat
*>
(
&
node
);
std
::
vector
<
T
*>
in_args
;
std
::
vector
<
const
T
*>
in_args
;
std
::
vector
<
Shape
>
in_shapes
;
for
(
std
::
shared_ptr
<
HostTensorView
>
arg
:
args
)
{
...
...
src/ngraph/runtime/kernel/abs.hpp
View file @
6a1b2ee2
...
...
@@ -25,7 +25,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
abs
(
T
*
arg
,
T
*
out
,
size_t
count
)
void
abs
(
const
T
*
arg
,
T
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
src/ngraph/runtime/kernel/acos.hpp
View file @
6a1b2ee2
...
...
@@ -26,7 +26,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
acos
(
T
*
arg
,
T
*
out
,
size_t
count
)
void
acos
(
const
T
*
arg
,
T
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
src/ngraph/runtime/kernel/add.hpp
View file @
6a1b2ee2
...
...
@@ -25,7 +25,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
add
(
T
*
arg0
,
T
*
arg1
,
T
*
out
,
size_t
count
)
void
add
(
const
T
*
arg0
,
const
T
*
arg1
,
T
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
src/ngraph/runtime/kernel/allreduce.hpp
View file @
6a1b2ee2
...
...
@@ -26,7 +26,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
allreduce
(
T
*
arg
,
T
*
out
,
const
element
::
Type
element_type
,
int
count
)
void
allreduce
(
const
T
*
arg
,
T
*
out
,
const
element
::
Type
element_type
,
int
count
)
{
auto
data_type
=
MPI_FLOAT
;
...
...
src/ngraph/runtime/kernel/asin.hpp
View file @
6a1b2ee2
...
...
@@ -26,7 +26,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
asin
(
T
*
arg
,
T
*
out
,
size_t
count
)
void
asin
(
const
T
*
arg
,
T
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
src/ngraph/runtime/kernel/atan.hpp
View file @
6a1b2ee2
...
...
@@ -26,7 +26,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
atan
(
T
*
arg
,
T
*
out
,
size_t
count
)
void
atan
(
const
T
*
arg
,
T
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
src/ngraph/runtime/kernel/avg_pool.hpp
View file @
6a1b2ee2
...
...
@@ -31,7 +31,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
avg_pool_backprop
(
T
*
delta
,
void
avg_pool_backprop
(
const
T
*
delta
,
T
*
out
,
const
Shape
&
delta_shape
,
const
Shape
&
out_shape
,
...
...
@@ -120,7 +120,7 @@ namespace ngraph
}
template
<
typename
T
>
void
avg_pool
(
T
*
arg
,
void
avg_pool
(
const
T
*
arg
,
T
*
out
,
const
Shape
&
arg_shape
,
const
Shape
&
out_shape
,
...
...
src/ngraph/runtime/kernel/broadcast.hpp
View file @
6a1b2ee2
...
...
@@ -27,7 +27,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
broadcast
(
T
*
arg
,
void
broadcast
(
const
T
*
arg
,
T
*
out
,
const
Shape
&
in_shape
,
const
Shape
&
out_shape
,
...
...
src/ngraph/runtime/kernel/ceiling.hpp
View file @
6a1b2ee2
...
...
@@ -26,7 +26,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
ceiling
(
T
*
arg
,
T
*
out
,
size_t
count
)
void
ceiling
(
const
T
*
arg
,
T
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
src/ngraph/runtime/kernel/concat.hpp
View file @
6a1b2ee2
...
...
@@ -27,7 +27,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
concat
(
const
std
::
vector
<
T
*>&
args
,
void
concat
(
const
std
::
vector
<
const
T
*>&
args
,
T
*
out
,
const
std
::
vector
<
Shape
>&
in_shapes
,
const
Shape
&
out_shape
,
...
...
src/ngraph/runtime/kernel/convert.hpp
View file @
6a1b2ee2
...
...
@@ -25,7 +25,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
TI
,
typename
TO
>
void
convert
(
TI
*
arg
,
TO
*
out
,
size_t
count
)
void
convert
(
const
TI
*
arg
,
TO
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
src/ngraph/runtime/kernel/convolution.hpp
View file @
6a1b2ee2
...
...
@@ -29,8 +29,8 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
convolution
(
T
*
arg0
,
T
*
arg1
,
void
convolution
(
const
T
*
arg0
,
const
T
*
arg1
,
T
*
out
,
const
Shape
&
arg0_shape
,
const
Shape
&
arg1_shape
,
...
...
src/ngraph/runtime/kernel/copy.hpp
View file @
6a1b2ee2
...
...
@@ -25,7 +25,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
copy
(
T
*
arg
,
T
*
out
,
size_t
count
)
void
copy
(
const
T
*
arg
,
T
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
src/ngraph/runtime/kernel/cos.hpp
View file @
6a1b2ee2
...
...
@@ -26,7 +26,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
cos
(
T
*
arg
,
T
*
out
,
size_t
count
)
void
cos
(
const
T
*
arg
,
T
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
src/ngraph/runtime/kernel/cosh.hpp
View file @
6a1b2ee2
...
...
@@ -26,7 +26,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
cosh
(
T
*
arg
,
T
*
out
,
size_t
count
)
void
cosh
(
const
T
*
arg
,
T
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
src/ngraph/runtime/kernel/divide.hpp
View file @
6a1b2ee2
...
...
@@ -32,7 +32,7 @@ namespace ngraph
// In English: return type is void and T must be an integral type.
template
<
typename
T
>
typename
std
::
enable_if
<
std
::
is_integral
<
T
>::
value
>::
type
divide
(
T
*
arg0
,
T
*
arg1
,
T
*
out
,
size_t
count
)
divide
(
const
T
*
arg0
,
const
T
*
arg1
,
T
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
@@ -47,7 +47,7 @@ namespace ngraph
// In English: return type is void and T must be a floating point type.
template
<
typename
T
>
typename
std
::
enable_if
<
std
::
is_floating_point
<
T
>::
value
>::
type
divide
(
T
*
arg0
,
T
*
arg1
,
T
*
out
,
size_t
count
)
divide
(
const
T
*
arg0
,
const
T
*
arg1
,
T
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
src/ngraph/runtime/kernel/dot.hpp
View file @
6a1b2ee2
...
...
@@ -28,8 +28,8 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
dot
(
T
*
arg0
,
T
*
arg1
,
void
dot
(
const
T
*
arg0
,
const
T
*
arg1
,
T
*
out
,
const
Shape
&
arg0_shape
,
const
Shape
&
arg1_shape
,
...
...
src/ngraph/runtime/kernel/equal.hpp
View file @
6a1b2ee2
...
...
@@ -28,8 +28,8 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
equal
(
T
*
arg0
,
T
*
arg1
,
void
equal
(
const
T
*
arg0
,
const
T
*
arg1
,
char
*
out
,
size_t
count
)
// TODO: using char for bool, is this right?
{
...
...
src/ngraph/runtime/kernel/exp.hpp
View file @
6a1b2ee2
...
...
@@ -26,7 +26,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
exp
(
T
*
arg
,
T
*
out
,
size_t
count
)
void
exp
(
const
T
*
arg
,
T
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
src/ngraph/runtime/kernel/floor.hpp
View file @
6a1b2ee2
...
...
@@ -26,7 +26,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
floor
(
T
*
arg
,
T
*
out
,
size_t
count
)
void
floor
(
const
T
*
arg
,
T
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
src/ngraph/runtime/kernel/greater.hpp
View file @
6a1b2ee2
...
...
@@ -25,8 +25,8 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
greater
(
T
*
arg0
,
T
*
arg1
,
void
greater
(
const
T
*
arg0
,
const
T
*
arg1
,
char
*
out
,
size_t
count
)
// TODO: using char for bool, is this right?
{
...
...
src/ngraph/runtime/kernel/greater_eq.hpp
View file @
6a1b2ee2
...
...
@@ -25,8 +25,8 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
greater_eq
(
T
*
arg0
,
T
*
arg1
,
void
greater_eq
(
const
T
*
arg0
,
const
T
*
arg1
,
char
*
out
,
size_t
count
)
// TODO: using char for bool, is this right?
{
...
...
src/ngraph/runtime/kernel/less.hpp
View file @
6a1b2ee2
...
...
@@ -25,8 +25,8 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
less
(
T
*
arg0
,
T
*
arg1
,
void
less
(
const
T
*
arg0
,
const
T
*
arg1
,
char
*
out
,
size_t
count
)
// TODO: using char for bool, is this right?
{
...
...
src/ngraph/runtime/kernel/less_eq.hpp
View file @
6a1b2ee2
...
...
@@ -25,8 +25,8 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
less_eq
(
T
*
arg0
,
T
*
arg1
,
void
less_eq
(
const
T
*
arg0
,
const
T
*
arg1
,
char
*
out
,
size_t
count
)
// TODO: using char for bool, is this right?
{
...
...
src/ngraph/runtime/kernel/log.hpp
View file @
6a1b2ee2
...
...
@@ -26,7 +26,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
log
(
T
*
arg
,
T
*
out
,
size_t
count
)
void
log
(
const
T
*
arg
,
T
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
src/ngraph/runtime/kernel/max.hpp
View file @
6a1b2ee2
...
...
@@ -28,7 +28,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
max
(
T
*
arg
,
void
max
(
const
T
*
arg
,
T
*
out
,
const
Shape
&
in_shape
,
const
Shape
&
out_shape
,
...
...
src/ngraph/runtime/kernel/max_pool.hpp
View file @
6a1b2ee2
...
...
@@ -28,8 +28,8 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
max_pool_backprop
(
T
*
arg_forward
,
T
*
delta
,
void
max_pool_backprop
(
const
T
*
arg_forward
,
const
T
*
delta
,
T
*
out
,
const
Shape
&
delta_shape
,
const
Shape
&
out_shape
,
// same as arg_forward_shape
...
...
@@ -122,7 +122,7 @@ namespace ngraph
}
template
<
typename
T
>
void
max_pool
(
T
*
arg
,
void
max_pool
(
const
T
*
arg
,
T
*
out
,
const
Shape
&
arg_shape
,
const
Shape
&
out_shape
,
...
...
src/ngraph/runtime/kernel/maximum.hpp
View file @
6a1b2ee2
...
...
@@ -25,7 +25,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
maximum
(
T
*
arg0
,
T
*
arg1
,
T
*
out
,
size_t
count
)
void
maximum
(
const
T
*
arg0
,
const
T
*
arg1
,
T
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
src/ngraph/runtime/kernel/min.hpp
View file @
6a1b2ee2
...
...
@@ -28,7 +28,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
min
(
T
*
arg
,
void
min
(
const
T
*
arg
,
T
*
out
,
const
Shape
&
in_shape
,
const
Shape
&
out_shape
,
...
...
src/ngraph/runtime/kernel/minimum.hpp
View file @
6a1b2ee2
...
...
@@ -25,7 +25,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
minimum
(
T
*
arg0
,
T
*
arg1
,
T
*
out
,
size_t
count
)
void
minimum
(
const
T
*
arg0
,
const
T
*
arg1
,
T
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
src/ngraph/runtime/kernel/multiply.hpp
View file @
6a1b2ee2
...
...
@@ -25,7 +25,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
multiply
(
T
*
arg0
,
T
*
arg1
,
T
*
out
,
size_t
count
)
void
multiply
(
const
T
*
arg0
,
const
T
*
arg1
,
T
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
src/ngraph/runtime/kernel/negate.hpp
View file @
6a1b2ee2
...
...
@@ -25,7 +25,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
negate
(
T
*
arg
,
T
*
out
,
size_t
count
)
void
negate
(
const
T
*
arg
,
T
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
src/ngraph/runtime/kernel/not.hpp
View file @
6a1b2ee2
...
...
@@ -25,7 +25,7 @@ namespace ngraph
namespace
kernel
{
static
inline
void
logical_not
(
char
*
arg
,
logical_not
(
c
onst
c
har
*
arg
,
char
*
out
,
size_t
count
)
// TODO: using char for bool, is this right?
{
...
...
src/ngraph/runtime/kernel/not_equal.hpp
View file @
6a1b2ee2
...
...
@@ -28,8 +28,8 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
not_equal
(
T
*
arg0
,
T
*
arg1
,
void
not_equal
(
const
T
*
arg0
,
const
T
*
arg1
,
char
*
out
,
size_t
count
)
// TODO: using char for bool, is this right?
{
...
...
src/ngraph/runtime/kernel/one_hot.hpp
View file @
6a1b2ee2
...
...
@@ -29,8 +29,11 @@ namespace ngraph
// NOTE: Execution throws `std::range_error` if either a non-integral value or an out-of-bounds
// value is detected in the input tensor.
template
<
typename
T
>
void
one_hot
(
T
*
arg
,
T
*
out
,
const
Shape
&
in_shape
,
const
Shape
&
out_shape
,
size_t
one_hot_axis
)
void
one_hot
(
const
T
*
arg
,
T
*
out
,
const
Shape
&
in_shape
,
const
Shape
&
out_shape
,
size_t
one_hot_axis
)
{
// Step 1: Zero out the output.
CoordinateTransform
output_transform
(
out_shape
);
...
...
src/ngraph/runtime/kernel/pad.hpp
View file @
6a1b2ee2
...
...
@@ -28,8 +28,8 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
pad
(
T
*
arg0
,
T
*
arg1
,
void
pad
(
const
T
*
arg0
,
const
T
*
arg1
,
T
*
out
,
const
Shape
&
arg0_shape
,
const
Shape
&
out_shape
,
...
...
src/ngraph/runtime/kernel/power.hpp
View file @
6a1b2ee2
...
...
@@ -26,7 +26,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
power
(
T
*
arg0
,
T
*
arg1
,
T
*
out
,
size_t
count
)
void
power
(
const
T
*
arg0
,
const
T
*
arg1
,
T
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
src/ngraph/runtime/kernel/product.hpp
View file @
6a1b2ee2
...
...
@@ -27,7 +27,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
product
(
T
*
arg
,
void
product
(
const
T
*
arg
,
T
*
out
,
const
Shape
&
in_shape
,
const
Shape
&
out_shape
,
...
...
src/ngraph/runtime/kernel/reduce.hpp
View file @
6a1b2ee2
...
...
@@ -28,8 +28,8 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
reduce
(
T
*
arg0
,
T
*
arg1
,
// TODO: really we should just pass a T here.
void
reduce
(
const
T
*
arg0
,
const
T
*
arg1
,
// TODO: really we should just pass a T here.
T
*
out
,
const
Shape
&
in_shape
,
const
Shape
&
out_shape
,
...
...
src/ngraph/runtime/kernel/reduce_window.hpp
View file @
6a1b2ee2
...
...
@@ -28,8 +28,8 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
reduce_window
(
T
*
arg_reductee
,
T
*
arg_init
,
void
reduce_window
(
const
T
*
arg_reductee
,
const
T
*
arg_init
,
T
*
out
,
const
Shape
&
arg_reductee_shape
,
const
Shape
&
out_shape
,
...
...
src/ngraph/runtime/kernel/relu.hpp
View file @
6a1b2ee2
...
...
@@ -25,7 +25,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
relu
(
T
*
arg
,
T
*
out
,
size_t
count
)
void
relu
(
const
T
*
arg
,
T
*
out
,
size_t
count
)
{
T
zero
=
0
;
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
...
...
@@ -34,7 +34,7 @@ namespace ngraph
}
}
template
<
typename
T
>
void
relu_backprop
(
T
*
arg
,
T
*
delta_arg
,
T
*
out
,
size_t
count
)
void
relu_backprop
(
const
T
*
arg
,
T
*
delta_arg
,
T
*
out
,
size_t
count
)
{
T
zero
=
0
;
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
...
...
src/ngraph/runtime/kernel/replace_slice.hpp
View file @
6a1b2ee2
...
...
@@ -27,8 +27,8 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
replace_slice
(
T
*
arg0
,
// replacement context
T
*
arg1
,
// replacement value
void
replace_slice
(
const
T
*
arg0
,
// replacement context
const
T
*
arg1
,
// replacement value
T
*
out
,
const
Shape
&
arg1_shape
,
const
Coordinate
&
lower_bounds
,
...
...
src/ngraph/runtime/kernel/reshape.hpp
View file @
6a1b2ee2
...
...
@@ -28,7 +28,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
reshape
(
T
*
arg
,
void
reshape
(
const
T
*
arg
,
T
*
out
,
const
Shape
&
in_shape
,
const
AxisVector
&
in_axis_order
,
...
...
src/ngraph/runtime/kernel/result.hpp
View file @
6a1b2ee2
...
...
@@ -27,7 +27,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
result
(
T
*
arg
,
T
*
out
,
size_t
count
)
void
result
(
const
T
*
arg
,
T
*
out
,
size_t
count
)
{
memcpy
(
out
,
arg
,
sizeof
(
T
)
*
count
);
}
...
...
src/ngraph/runtime/kernel/reverse.hpp
View file @
6a1b2ee2
...
...
@@ -27,7 +27,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
reverse
(
T
*
arg
,
void
reverse
(
const
T
*
arg
,
T
*
out
,
const
Shape
&
arg_shape
,
const
Shape
&
out_shape
,
...
...
src/ngraph/runtime/kernel/select.hpp
View file @
6a1b2ee2
...
...
@@ -25,9 +25,9 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
select
(
char
*
arg0
,
T
*
arg1
,
T
*
arg2
,
void
select
(
c
onst
c
har
*
arg0
,
const
T
*
arg1
,
const
T
*
arg2
,
T
*
out
,
size_t
count
)
// TODO: using char for bool, is this right?
{
...
...
src/ngraph/runtime/kernel/select_and_scatter.hpp
View file @
6a1b2ee2
...
...
@@ -28,9 +28,9 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
select_and_scatter
(
T
*
arg_selectee
,
T
*
arg_source
,
T
*
arg_init
,
void
select_and_scatter
(
const
T
*
arg_selectee
,
const
T
*
arg_source
,
const
T
*
arg_init
,
T
*
out
,
const
Shape
&
arg_selectee_shape
,
const
Shape
&
arg_source_shape
,
...
...
src/ngraph/runtime/kernel/sign.hpp
View file @
6a1b2ee2
...
...
@@ -25,7 +25,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
sign
(
T
*
arg
,
T
*
out
,
size_t
count
)
void
sign
(
const
T
*
arg
,
T
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
src/ngraph/runtime/kernel/sin.hpp
View file @
6a1b2ee2
...
...
@@ -26,7 +26,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
sin
(
T
*
arg
,
T
*
out
,
size_t
count
)
void
sin
(
const
T
*
arg
,
T
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
src/ngraph/runtime/kernel/sinh.hpp
View file @
6a1b2ee2
...
...
@@ -26,7 +26,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
sinh
(
T
*
arg
,
T
*
out
,
size_t
count
)
void
sinh
(
const
T
*
arg
,
T
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
src/ngraph/runtime/kernel/slice.hpp
View file @
6a1b2ee2
...
...
@@ -27,7 +27,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
slice
(
T
*
arg
,
void
slice
(
const
T
*
arg
,
T
*
out
,
const
Shape
&
arg_shape
,
const
Coordinate
&
lower_bounds
,
...
...
src/ngraph/runtime/kernel/softmax.hpp
View file @
6a1b2ee2
...
...
@@ -28,7 +28,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
softmax
(
T
*
arg
,
T
*
out
,
const
Shape
&
shape
,
const
AxisSet
&
axes
)
void
softmax
(
const
T
*
arg
,
T
*
out
,
const
Shape
&
shape
,
const
AxisSet
&
axes
)
{
auto
temp_shape
=
project
(
shape
,
axes
);
auto
temp_elements
=
std
::
accumulate
(
...
...
src/ngraph/runtime/kernel/sqrt.hpp
View file @
6a1b2ee2
...
...
@@ -26,7 +26,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
sqrt
(
T
*
arg
,
T
*
out
,
size_t
count
)
void
sqrt
(
const
T
*
arg
,
T
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
src/ngraph/runtime/kernel/subtract.hpp
View file @
6a1b2ee2
...
...
@@ -25,7 +25,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
subtract
(
T
*
arg0
,
T
*
arg1
,
T
*
out
,
size_t
count
)
void
subtract
(
const
T
*
arg0
,
const
T
*
arg1
,
T
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
src/ngraph/runtime/kernel/sum.hpp
View file @
6a1b2ee2
...
...
@@ -27,7 +27,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
sum
(
T
*
arg
,
void
sum
(
const
T
*
arg
,
T
*
out
,
const
Shape
&
in_shape
,
const
Shape
&
out_shape
,
...
...
src/ngraph/runtime/kernel/tan.hpp
View file @
6a1b2ee2
...
...
@@ -26,7 +26,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
tan
(
T
*
arg
,
T
*
out
,
size_t
count
)
void
tan
(
const
T
*
arg
,
T
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
src/ngraph/runtime/kernel/tanh.hpp
View file @
6a1b2ee2
...
...
@@ -26,7 +26,7 @@ namespace ngraph
namespace
kernel
{
template
<
typename
T
>
void
tanh
(
T
*
arg
,
T
*
out
,
size_t
count
)
void
tanh
(
const
T
*
arg
,
T
*
out
,
size_t
count
)
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment