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 @@
// 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;
......
......@@ -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;
......
......@@ -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);
}
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