Commit 0064cfd0 authored by Scott Cyphers's avatar Scott Cyphers

types and value descriptors

parent 341a34b2
#pragma once
#include <memory>
#include <vector>
#include "values/types.hpp"
namespace ngraph {
class ValueDescriptor
{
public:
virtual std::shared_ptr<ValueType> value_type() const = 0;
};
class TensorDescriptor
{
protected:
ElementType element_type;
};
class TensorLayoutDescriptor
{
};
class TensorViewDescriptor : public ValueDescriptor
{
public:
std::shared_ptr<ValueType> value_type() const override {
return m_type;
}
protected:
std::shared_ptr<TensorViewType> m_type;
TensorDescriptor m_tensor_descriptor;
TensorLayoutDescriptor m_tensor_layout_descriptor;
};
class TupleDescriptor : public ValueDescriptor
{
public:
std::shared_ptr<ValueType> value_type() const override {
return m_type;
}
protected:
std::shared_ptr<TupleType> m_type;
std::vector<ValueDescriptor> m_element_descriptors;
};
} // End of NGRAPH
#pragma once
#include <memory>
#include <vector>
#include "element_type.hpp"
namespace ngraph {
using value_size_t = size_t;
// Base type for ngraph values
class ValueType
{
};
class TensorViewType : public ValueType
{
protected:
ElementType m_element_type;
std::vector<value_size_t> m_shape;
};
class TupleType : public ValueType
{
protected:
// Is this name too similar to TensorViewType.to m_element_type?
std::vector<ValueType> m_element_types;
};
} // End of ngraph
\ No newline at end of file
......@@ -22,6 +22,7 @@ include_directories(
set (SRC
main.cpp
build_graph.cpp
util.cpp
tensor.cpp
exop.cpp
......
#include "values/descriptors.hpp"
using namespace std;
using namespace ngraph;
void build_simple_graph()
{
}
\ No newline at end of file
......@@ -19,7 +19,7 @@
using namespace std;
extern "C" int main(int argc, char** argv)
int main(int argc, char** argv)
{
const char* exclude = "--gtest_filter=-benchmark.*";
vector<char*> argv_vector;
......
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