Commit 3691c577 authored by Yixing Lao's avatar Yixing Lao Committed by Yixing Lao

include Eigen with double quotes

parent 1f2193e3
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#include <Eigen/Dense>
#include <memory> #include <memory>
#include "Eigen/Dense"
#include "ngraph/ngraph.hpp" #include "ngraph/ngraph.hpp"
using namespace Eigen; using namespace Eigen;
......
...@@ -14,12 +14,12 @@ ...@@ -14,12 +14,12 @@
#pragma once #pragma once
#include <Eigen/Dense>
#include <vector> #include <vector>
#include "ngraph/shape.hpp" #include "Eigen/Dense"
#include "ngraph/runtime/tensor_view.hpp"
#include "ngraph/descriptor/tensor_view.hpp" #include "ngraph/descriptor/tensor_view.hpp"
#include "ngraph/runtime/tensor_view.hpp"
#include "ngraph/shape.hpp"
namespace ngraph namespace ngraph
{ {
...@@ -27,7 +27,8 @@ namespace ngraph ...@@ -27,7 +27,8 @@ namespace ngraph
{ {
namespace eigen 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> template <typename ET>
class PrimaryTensorView : public ngraph::runtime::PrimaryTensorView class PrimaryTensorView : public ngraph::runtime::PrimaryTensorView
...@@ -69,12 +70,9 @@ namespace ngraph ...@@ -69,12 +70,9 @@ namespace ngraph
// For getting the data out // For getting the data out
const storage_type& get_vector() { return m_vector; } const storage_type& get_vector() { return m_vector; }
eigen_map& get_map() { return m_map; } eigen_map& get_map() { return m_map; }
const eigen_map& get_map() const { return m_map; } const eigen_map& get_map() const { return m_map; }
const Shape& get_shape() const { return m_shape; } const Shape& get_shape() const { return m_shape; }
protected: protected:
ngraph::Shape m_shape; ngraph::Shape m_shape;
size_t m_size; size_t m_size;
......
...@@ -13,18 +13,18 @@ ...@@ -13,18 +13,18 @@
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#include <iostream> #include <iostream>
#include <Eigen/Dense>
#include "Eigen/Dense"
#include "gtest/gtest.h" #include "gtest/gtest.h"
using Eigen::MatrixXd; using Eigen::MatrixXd;
TEST(eigen, simple) TEST(eigen, simple)
{ {
MatrixXd m(2,2); MatrixXd m(2, 2);
m(0,0) = 3; m(0, 0) = 3;
m(1,0) = 2.5; m(1, 0) = 2.5;
m(0,1) = -1; m(0, 1) = -1;
m(1,1) = m(1,0) + m(0,1); m(1, 1) = m(1, 0) + m(0, 1);
EXPECT_FLOAT_EQ(m(1,1), 1.5); EXPECT_FLOAT_EQ(m(1, 1), 1.5);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment