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
3691c577
Commit
3691c577
authored
Sep 21, 2017
by
Yixing Lao
Committed by
Yixing Lao
Sep 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include Eigen with double quotes
parent
1f2193e3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
18 deletions
+16
-18
tensor_view.cpp
src/ngraph/runtime/eigen/tensor_view.cpp
+1
-1
tensor_view.hpp
src/ngraph/runtime/eigen/tensor_view.hpp
+8
-10
eigen.cpp
test/eigen.cpp
+7
-7
No files found.
src/ngraph/runtime/eigen/tensor_view.cpp
View file @
3691c577
...
...
@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// ----------------------------------------------------------------------------
#include <Eigen/Dense>
#include <memory>
#include "Eigen/Dense"
#include "ngraph/ngraph.hpp"
using
namespace
Eigen
;
...
...
src/ngraph/runtime/eigen/tensor_view.hpp
View file @
3691c577
...
...
@@ -14,12 +14,12 @@
#pragma once
#include <Eigen/Dense>
#include <vector>
#include "ngraph/shape.hpp"
#include "ngraph/runtime/tensor_view.hpp"
#include "Eigen/Dense"
#include "ngraph/descriptor/tensor_view.hpp"
#include "ngraph/runtime/tensor_view.hpp"
#include "ngraph/shape.hpp"
namespace
ngraph
{
...
...
@@ -27,7 +27,8 @@ namespace ngraph
{
namespace
eigen
{
std
::
shared_ptr
<
ngraph
::
runtime
::
PrimaryTensorView
>
make_tensor_view
(
std
::
shared_ptr
<
ngraph
::
descriptor
::
TensorView
>
);
std
::
shared_ptr
<
ngraph
::
runtime
::
PrimaryTensorView
>
make_tensor_view
(
std
::
shared_ptr
<
ngraph
::
descriptor
::
TensorView
>
);
template
<
typename
ET
>
class
PrimaryTensorView
:
public
ngraph
::
runtime
::
PrimaryTensorView
...
...
@@ -69,12 +70,9 @@ namespace ngraph
// For getting the data out
const
storage_type
&
get_vector
()
{
return
m_vector
;
}
eigen_map
&
get_map
()
{
return
m_map
;
}
const
eigen_map
&
get_map
()
const
{
return
m_map
;
}
const
Shape
&
get_shape
()
const
{
return
m_shape
;
}
eigen_map
&
get_map
()
{
return
m_map
;
}
const
eigen_map
&
get_map
()
const
{
return
m_map
;
}
const
Shape
&
get_shape
()
const
{
return
m_shape
;
}
protected
:
ngraph
::
Shape
m_shape
;
size_t
m_size
;
...
...
test/eigen.cpp
View file @
3691c577
...
...
@@ -13,18 +13,18 @@
// ----------------------------------------------------------------------------
#include <iostream>
#include <Eigen/Dense>
#include "Eigen/Dense"
#include "gtest/gtest.h"
using
Eigen
::
MatrixXd
;
TEST
(
eigen
,
simple
)
{
MatrixXd
m
(
2
,
2
);
m
(
0
,
0
)
=
3
;
m
(
1
,
0
)
=
2.5
;
m
(
0
,
1
)
=
-
1
;
m
(
1
,
1
)
=
m
(
1
,
0
)
+
m
(
0
,
1
);
EXPECT_FLOAT_EQ
(
m
(
1
,
1
),
1.5
);
MatrixXd
m
(
2
,
2
);
m
(
0
,
0
)
=
3
;
m
(
1
,
0
)
=
2.5
;
m
(
0
,
1
)
=
-
1
;
m
(
1
,
1
)
=
m
(
1
,
0
)
+
m
(
0
,
1
);
EXPECT_FLOAT_EQ
(
m
(
1
,
1
),
1.5
);
}
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