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
0064cfd0
Commit
0064cfd0
authored
Aug 17, 2017
by
Scott Cyphers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
types and value descriptors
parent
341a34b2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
94 additions
and
1 deletion
+94
-1
descriptors.hpp
src/values/descriptors.hpp
+50
-0
types.hpp
src/values/types.hpp
+33
-0
CMakeLists.txt
test/CMakeLists.txt
+1
-0
build_graph.cpp
test/build_graph.cpp
+9
-0
main.cpp
test/main.cpp
+1
-1
No files found.
src/values/descriptors.hpp
0 → 100644
View file @
0064cfd0
#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
src/values/types.hpp
0 → 100644
View file @
0064cfd0
#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
test/CMakeLists.txt
View file @
0064cfd0
...
...
@@ -22,6 +22,7 @@ include_directories(
set
(
SRC
main.cpp
build_graph.cpp
util.cpp
tensor.cpp
exop.cpp
...
...
test/build_graph.cpp
0 → 100644
View file @
0064cfd0
#include "values/descriptors.hpp"
using
namespace
std
;
using
namespace
ngraph
;
void
build_simple_graph
()
{
}
\ No newline at end of file
test/main.cpp
View file @
0064cfd0
...
...
@@ -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
;
...
...
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